Right now everything is tested using a simple input(…) -> hex digest model. It'd be better to support streaming interfaces and possibly to do so in a way which would allow something like a File object to be passed in directly to avoid passing large data references around. Maybe something like hasher(expectedSize, callback) which could accept any function which will emit Uint8Arrays until exhausted?
Right now everything is tested using a simple
input(…) -> hex digest
model. It'd be better to support streaming interfaces and possibly to do so in a way which would allow something like aFile
object to be passed in directly to avoid passing large data references around. Maybe something likehasher(expectedSize, callback)
which could accept any function which will emitUint8Array
s until exhausted?