asmcrypto / asmcrypto.js

JavaScript Cryptographic Library with performance in mind.
MIT License
659 stars 182 forks source link

Progressive SHA computation #118

Closed nl78 closed 7 years ago

nl78 commented 7 years ago

Dear all,

I would like to compute SHA-256 hash for (really) big file using minimized version of asmCrypto. It seems there's no exposed API to do this.

From my perspective, something like that, would be great : asmCrypto.SHA256.reset(); asmCrypto.SHA256.process(data); asmCrypto.SHA256.process(moreData); asmCrypto.SHA256.finalize();

Is there an known workaround or plan ? Any hints would be greatly appreciated.

Kind regards

ps. sorry for using bugreport to contact you, is there a better way?

Nicolas

vibornoff commented 7 years ago
var hashBytes = (new asmCrypto.SHA256).process(data).process(moreData).finish().result;