sodium-native
Advanced tools
Comparing version 1.4.1 to 1.5.0
{ | ||
"name": "sodium-native", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "Low level bindings for libsodium", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -144,2 +144,6 @@ # sodium-native | ||
#### `crypto_generichash_batch(output, inputArray, [key])` | ||
Same as `crypto_generichash` except this hashes an array of buffers instead of a single one. | ||
#### `var instance = crypto_generichash_instance([key], [outputLength])` | ||
@@ -146,0 +150,0 @@ |
@@ -110,1 +110,28 @@ var tape = require('tape') | ||
}) | ||
tape('crypto_generichash_batch', function (t) { | ||
var buf = new Buffer('Hej, Verden') | ||
var batch = [] | ||
for (var i = 0; i < 10; i++) batch.push(buf) | ||
var out = alloc(sodium.crypto_generichash_BYTES) | ||
sodium.crypto_generichash_batch(out, batch) | ||
t.same(out.toString('hex'), 'cbc20f347f5dfe37dc13231cbf7eaa4ec48e585ec055a96839b213f62bd8ce00', 'batch hash') | ||
t.end() | ||
}) | ||
tape('crypto_generichash_batch with key', function (t) { | ||
var key = alloc(sodium.crypto_generichash_KEYBYTES) | ||
fill(key, 'lo') | ||
var buf = new Buffer('Hej, Verden') | ||
var batch = [] | ||
for (var i = 0; i < 10; i++) batch.push(buf) | ||
var out = alloc(sodium.crypto_generichash_BYTES) | ||
sodium.crypto_generichash_batch(out, batch, key) | ||
t.same(out.toString('hex'), '405f14acbeeb30396b8030f78e6a84bab0acf08cb1376aa200a500f669f675dc', 'batch keyed hash') | ||
t.end() | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
16089855
679
546