diff --git a/crypto_auth.js b/crypto_auth.js index 4b4005a..2863e27 100644 --- a/crypto_auth.js +++ b/crypto_auth.js @@ -5,8 +5,6 @@ const Sha256 = require('sha256-universal') const Sha512 = require('sha512-universal') const assert = require('nanoassert') -const crypto_auth_BYTES = 32 -const crypto_auth_KEYBYTES = 32 const crypto_auth_hmacsha256_BYTES = 32 const crypto_auth_hmacsha256_KEYBYTES = 32 const crypto_auth_hmacsha512_BYTES = 64 @@ -14,6 +12,9 @@ const crypto_auth_hmacsha512_KEYBYTES = 32 const crypto_auth_hmacsha512256_BYTES = 32 const crypto_auth_hmacsha512256_KEYBYTES = 32 +const crypto_auth_BYTES = crypto_auth_hmacsha512256_BYTES +const crypto_auth_KEYBYTES = crypto_auth_hmacsha512256_KEYBYTES + function crypto_auth_hmacsha256 (out, input, k) { assert(out.byteLength === crypto_auth_hmacsha256_BYTES, "out should be 'crypto_auth_hmacsha256_BYTES' in length")