Comparing version 0.4.6 to 0.4.7
{ | ||
"name": "blakejs", | ||
"version": "0.4.6", | ||
"version": "0.4.7", | ||
"description": "Pure Javascript implementation of the BLAKE2b and BLAKE2s hash functions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,13 +10,13 @@ var test = require('tape') | ||
// From the example computation in the RFC | ||
t.equal('ba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d1' + | ||
'7d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923', | ||
blake2bHex('abc')) | ||
t.equal(blake2bHex('abc'), | ||
'ba80a53f981c4d0d6a2797b69f12f6e94c212f14685ac4b74b12bb6fdbffa2d1' + | ||
'7d87c5392aab792dc252d5de4533cc9518d38aa8dbf1925ab92386edd4009923') | ||
t.equal('786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419' + | ||
'd25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce', | ||
blake2bHex('')) | ||
t.equal(blake2bHex(''), | ||
'786a02f742015903c6c6fd852552d272912f4740e15847618a86e217f71f5419' + | ||
'd25e1031afee585313896444934eb04b903a685b1448b755d56f701afe9be2ce') | ||
t.equal('a8add4bdddfd93e4877d2746e62817b116364a1fa7bc148d95090bc7333b3673' + | ||
'f82401cf7aa2e4cb1ecd90296e3f14cb5413f8ed77be73045b13914cdcd6a918', | ||
blake2bHex('The quick brown fox jumps over the lazy dog')) | ||
t.equal(blake2bHex('The quick brown fox jumps over the lazy dog'), | ||
'a8add4bdddfd93e4877d2746e62817b116364a1fa7bc148d95090bc7333b3673' + | ||
'f82401cf7aa2e4cb1ecd90296e3f14cb5413f8ed77be73045b13914cdcd6a918') | ||
@@ -29,4 +29,4 @@ t.end() | ||
// We already verify that blake2bHex('abc') produces the correct hash above | ||
t.equal(blake2bHex('abc'), blake2bHex(new Uint8Array([97, 98, 99]))) | ||
t.equal(blake2bHex('abc'), blake2bHex(new Buffer([97, 98, 99]))) | ||
t.equal(blake2bHex(new Uint8Array([97, 98, 99])), blake2bHex('abc')) | ||
t.equal(blake2bHex(new Buffer([97, 98, 99])), blake2bHex('abc')) | ||
t.end() | ||
@@ -47,3 +47,3 @@ }) | ||
t.equal(outHex, blake2bHex(hexToBytes(inputHex), hexToBytes(keyHex), outLen)) | ||
t.equal(blake2bHex(hexToBytes(inputHex), hexToBytes(keyHex), outLen), outHex) | ||
}) | ||
@@ -79,4 +79,4 @@ t.end() | ||
t.equal(testCase.a0, arr[0]) | ||
t.equal(testCase.a1, arr[1]) | ||
t.equal(arr[0], testCase.a0) | ||
t.equal(arr[1], testCase.a1) | ||
}) | ||
@@ -83,0 +83,0 @@ t.end() |
@@ -13,6 +13,8 @@ var test = require('tape') | ||
// From the example computation in the RFC | ||
t.equal('508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982', | ||
blake2sHex('abc')) | ||
t.equal('508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982', | ||
blake2sHex(new Uint8Array([97, 98, 99]))) | ||
t.equal(blake2sHex('abc'), | ||
'508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982') | ||
t.equal(blake2sHex(new Uint8Array([97, 98, 99])), | ||
'508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982') | ||
t.equal(blake2sHex(new Buffer([97, 98, 99])), | ||
'508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982') | ||
t.end() | ||
@@ -53,3 +55,3 @@ }) | ||
var finalHash = blake2s_final(ctx) | ||
t.equal(toHex(expectedHash), toHex(finalHash)) | ||
t.equal(toHex(finalHash), toHex(expectedHash)) | ||
t.end() | ||
@@ -56,0 +58,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147906
623