]> git.codecow.com Git - libnemo.git/commitdiff
Fix blake type signature to indicate ArrayBuffer is valid argument.
authorChris Duncan <chris@zoso.dev>
Fri, 22 Aug 2025 07:24:38 +0000 (00:24 -0700)
committerChris Duncan <chris@zoso.dev>
Fri, 22 Aug 2025 07:24:38 +0000 (00:24 -0700)
src/lib/crypto/blake2b.ts

index df0a2ac66d3eb71c52d857490386f8e228d0f063..51df74ff959aad88a160e3934ccd001a188ca0d1 100644 (file)
@@ -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