From db739538f8f82e7d5b8170dc6e4f105da9f6bedb Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Fri, 22 Aug 2025 00:24:38 -0700 Subject: [PATCH] Fix blake type signature to indicate ArrayBuffer is valid argument. --- src/lib/crypto/blake2b.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.3