Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
hash-wasm vs Web Crypto API
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 135
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
wasm sha256
23254.2 Ops/sec
webcrypto sha256
52397.7 Ops/sec
wasm sha1
24942.2 Ops/sec
webcrypto sha1
59340.4 Ops/sec
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);});