diff --git a/packages/core/src/transport/cryptography.ts b/packages/core/src/transport/cryptography.ts index 2faeecc..56a40bb 100644 --- a/packages/core/src/transport/cryptography.ts +++ b/packages/core/src/transport/cryptography.ts @@ -19,5 +19,6 @@ export const newKey: () => Promise = const HMAC_BLAKE2s = makeHMAC(BLAKE2s); export function mac(secretKey: Bytes, data: Bytes): Bytes { - return Bytes.from(HMAC_BLAKE2s(underlying(secretKey), underlying(data))); + return Bytes.from(HMAC_BLAKE2s(underlying(secretKey), underlying(data)) + .subarray(0, KEY_LENGTH)); }