mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-10-01 01:26:10 -04:00
15 lines
371 B
JavaScript
15 lines
371 B
JavaScript
new sjcl.test.TestCase("SHA-256 from catameringue", function (cb) {
|
|
if (!sjcl.hash.sha256) {
|
|
this.unimplemented();
|
|
cb && cb();
|
|
return;
|
|
}
|
|
|
|
var i, kat=sjcl.test.vector.sha256, p=0, f=0;
|
|
for (i=0; i<kat.length; i++) {
|
|
var out = sjcl.hash.sha256.hash(kat[i][0]);
|
|
this.require(sjcl.codec.hex.fromBits(out) == kat[i][1], i);
|
|
}
|
|
cb && cb();
|
|
});
|