Experiment using Rust + WebAssembly to generate SHA-{1,2,3} hash implementations
See https://acdha.github.io/wasm-hashing/ to try it in your browser. For static strings, the WASM code is the performance lead on almost every size although SubtleCrypto may be competitive on SHA-1 at some message sizes.
One especially compelling story for this approach is that all common digest algorithms are supported by https://github.com/RustCrypto/hashes whereas most of the other JavaScript libraries only support a few or, in the case of jsSHA, are extremely slow.
yarn install --dev
)make
httplz
to serve the dist/
folderMake sure you're comfortable releasing any code under CC0