var Hash = require("crypto").Hash
, h = new Hash("md5")
, fs = require("fs")
, reader = fs.createReadStream("/etc/passwd")
reader.on("data", function (c) { h.update(c) })
reader.on("end", function () { console.log(h.digest("hex")) })
It'd be nice if the crypto Hash lib supported a similar surface to the
other stream APIs.
--i
> --
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.