Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
hash-wasm vs Web Crypto API
(version: 1)
Comparing performance of:
wasm sha256 vs webcrypto sha256 vs wasm sha1 vs webcrypto sha1
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/hash-wasm@4"></script>
Script Preparation code:
var data = new Uint32Array(1024); window.crypto.getRandomValues(data); var dataBuffer = new Uint8Array(data); data = String.fromCharCode.apply(null, dataBuffer);
Tests:
wasm sha256
console.log(hashwasm.sha256(data));
webcrypto sha256
crypto.subtle.digest("SHA-256", dataBuffer).then(function (hash) {console.log(hash);});
wasm sha1
console.log(hashwasm.sha1(data));
webcrypto sha1
crypto.subtle.digest("SHA-1", dataBuffer).then(function (hash) {console.log(hash);});
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
wasm sha256
webcrypto sha256
wasm sha1
webcrypto sha1
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
11 days ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0
Browser/OS:
Firefox 149 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
wasm sha256
46977.2 Ops/sec
webcrypto sha256
211595.8 Ops/sec
wasm sha1
61694.2 Ops/sec
webcrypto sha1
240407.0 Ops/sec
Related benchmarks:
Sha-xxx
wasm vs webcrypto
sha256-js
sha1-js
sha1-js-pref
Digest Sha-1
web-crypto
sha256-js twin
Simple string compare vs SHA-1 hash
Comments
Confirm delete:
Do you really want to delete benchmark?