summaryrefslogtreecommitdiffstats
path: root/test/sha512_test.js
blob: 85fee061f7c3ff95918860bf6000358ab34b52e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
new sjcl.test.TestCase("SHA-512 from catameringue", function (cb) {
  if (!sjcl.hash.sha512) {
    this.unimplemented();
    cb && cb();
    return;
  }

  var i, kat=sjcl.test.vector.sha512, p=0, f=0;
  for (i=0; i<kat.length; i++) {
    var out = sjcl.hash.sha512.hash(kat[i][0]);
    this.require(sjcl.codec.hex.fromBits(out) == kat[i][1], i);
  }
  cb && cb();
});