sha256 (v69)

Revision 69 of this benchmark created by Jack Yu on


Description

Small chunk size: 16 bytes.

Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://rawgithub.com/alexweber/jquery.sha256/master/jquery.sha256.js" type="text/javascript"></script>
<script src="http://www.bichlmeier.info/sha256.js"></script>
<script src="http://www.webtoolkit.info/djs/webtoolkit.sha256.js"></script>
<script src="http://www.movable-type.co.uk/scripts/utf8.js"></script>
<script src="http://www.movable-type.co.uk/scripts/sha256.js"></script>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha256.js"></script>
<script src="http://crypto.stanford.edu/sjcl/sjcl.js"></script>
<script src="http://vibornoff.com/asmcrypto.js"></script>

<script>
var digest;
var sjcl_sha256 = new window.sjcl.hash.sha256();
</script>

Setup

var input = "0123456789abcdef";
    input = utf8Encode(input);
    
    var buffer = new Uint8Array(input.length);
    for (var i=0; i<input.length; i++) buffer[i] = input.charCodeAt(i);
    
    function utf8Encode(str) {
        return window.unescape(window.encodeURIComponent(str));
    }

Test runner

Ready to run.

Testing in
TestOps/sec
bichlmeier
digest = sha256_digest(input);
ready
webtoolkit
digest = SHA256(input);
ready
movable-type.co.uk
digest = Sha256.hash(input);
ready
Weber
digest = $.sha256(input);
ready
sjcl
digest = sjcl_sha256.reset().update(input).finalize();
ready
CryptoJS
digest = CryptoJS.SHA256(input);
ready
Asm.js (string)
digest = asmCrypto.SHA256.hex(input);
ready
Asm.js (buffer)
digest = asmCrypto.SHA256.hex(buffer);
ready
sjcl.hash
digest = sjcl.hash.sha256.hash(input);
ready

Revisions

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