blob: 3460c69a8763397c2a620f85e438b59819fe42a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
new sjcl.test.TestCase("RIPEMD-160", function (cb) {
if (!sjcl.hash.ripemd160) {
this.unimplemented();
cb && cb();
return;
}
var i, kat=sjcl.test.vector.ripemd160, p=0, f=0;
for (i=0; i<kat.length; i++) {
var out = sjcl.hash.ripemd160.hash(kat[i][0]);
this.require(sjcl.codec.hex.fromBits(out) == kat[i][1], kat[i][0]);
}
cb && cb();
});
|