Repair mac() function to produce correct output width
This commit is contained in:
parent
a25cafdabb
commit
3b7543845a
|
@ -19,5 +19,6 @@ export const newKey: () => Promise<Bytes> =
|
|||
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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue