crypto

JavaScript performance comparison

Test case created by kirbdee

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
test crypto
// async test
var test = new Promise(async (resolve) => {
const {privateKey,publicKey} = await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},false,['sign','verify']);

const enc = new TextEncoder();
const data = enc.encode("hello world");

try {
var signature = await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},privateKey,data);
} catch (e) {
	console.log("issue signing",e,e.message)
}

try {
console.log('verify', await crypto.subtle.verify({name:"ECDSA",hash:"SHA-256"},publicKey,signature,data))	
} catch (e) {
	console.log("issue verifying",e,e.message)
}

resolve()
})

test.then(() => deferred.resolve())
pending…
test hello
console.log('hello')
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 Comments