bump sodium-test and minor tweak

This commit is contained in:
Mathias Buus 2017-07-13 16:47:59 +02:00
parent 384ec2f636
commit 212550db1b
2 changed files with 3 additions and 3 deletions

View File

@ -1682,11 +1682,11 @@ function crypto_sign_open(msg, sm, pk) {
function crypto_sign_verify_detached (sig, m, pk) {
check(sig, crypto_sign_BYTES)
var sm = new Uint8Array(m.length + sig.length)
var sm = new Uint8Array(m.length + crypto_sign_BYTES)
var i = 0
for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]
for (i = 0; i < m.length; i++) sm[i + crypto_sign_BYTES] = m[i]
return crypto_sign_open(sm, m, pk)
return crypto_sign_open(m, sm, pk)
}
function crypto_secretbox_detached (o, mac, msg, n, k) {

View File

@ -12,7 +12,7 @@
"devDependencies": {
"browser-run": "^4.0.2",
"browserify": "^14.1.0",
"sodium-test": "^0.6.0"
"sodium-test": "^0.7.0"
},
"scripts": {
"browser": "browserify test.js | browser-run",