diff options
author | Florian Dold <florian@dold.me> | 2021-10-19 18:39:38 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-10-19 18:39:47 +0200 |
commit | 26738d14f1d60d9aa7471d0be267d286a4644069 (patch) | |
tree | 1b35547ec784aef11006569dc252c4d2fb171316 /packages/taler-util/src | |
parent | aac2bc389a32b2e91494d097a3f3fc9560ddbfbc (diff) | |
download | wallet-core-26738d14f1d60d9aa7471d0be267d286a4644069.tar.xz |
anastasis-core: crypto fixes
Diffstat (limited to 'packages/taler-util/src')
-rw-r--r-- | packages/taler-util/src/nacl-fast.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/taler-util/src/nacl-fast.ts b/packages/taler-util/src/nacl-fast.ts index 6e721f32c..500ac11c9 100644 --- a/packages/taler-util/src/nacl-fast.ts +++ b/packages/taler-util/src/nacl-fast.ts @@ -2926,7 +2926,8 @@ export function crypto_sign_keyPair_fromSeed( secretKey: Uint8Array; } { checkArrayTypes(seed); - if (seed.length !== crypto_sign_SEEDBYTES) throw new Error("bad seed size"); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error(`bad seed size: ${seed.length}`); const pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); const sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); for (let i = 0; i < 32; i++) sk[i] = seed[i]; @@ -3015,4 +3016,3 @@ export function secretbox_open( if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return undefined; return m.subarray(crypto_secretbox_ZEROBYTES); } - |