From: Chris Duncan Date: Fri, 22 Aug 2025 07:24:38 +0000 (-0700) Subject: Fix blake type signature to indicate ArrayBuffer is valid argument. X-Git-Tag: v0.10.5~41^2~8 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=db739538f8f82e7d5b8170dc6e4f105da9f6bedb;p=libnemo.git Fix blake type signature to indicate ArrayBuffer is valid argument. --- diff --git a/src/lib/crypto/blake2b.ts b/src/lib/crypto/blake2b.ts index df0a2ac..51df74f 100644 --- a/src/lib/crypto/blake2b.ts +++ b/src/lib/crypto/blake2b.ts @@ -251,12 +251,12 @@ export class Blake2b { } } - update (input: Uint8Array): Blake2b { + update (input: ArrayBuffer | Uint8Array): Blake2b { if (input instanceof ArrayBuffer) { input = new Uint8Array(input) } if (!(input instanceof Uint8Array)) { - throw new TypeError('Input must be Uint8Array or Buffer') + throw new TypeError('Input must be ArrayBuffer or Uint8Array') } this.#blake2bUpdate(input) return this