From: Chris Duncan Date: Mon, 17 Aug 2026 20:35:32 +0000 (-0700) Subject: Hash from arrays which are passed as pointers not objects. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=54f856e6d63ac2c2eb352ba1f992fd8c3d4abef4;p=nano25519.git Hash from arrays which are passed as pointers not objects. --- diff --git a/src/assembly/blake2b.ts b/src/assembly/blake2b.ts index 72a2688..e0712f0 100644 --- a/src/assembly/blake2b.ts +++ b/src/assembly/blake2b.ts @@ -89,7 +89,7 @@ export class Blake2b { } // input: variable-length message bytes passed by user to be hashed - update (input: usize, length: i32): Blake2b { + update (input: StaticArray, length: i32): Blake2b { for (let i = 0; i < length; i++) { // is buffer full? @@ -106,7 +106,7 @@ export class Blake2b { } // increment buffer counter and set byte - this.b[this.c++] = load(input + i) + this.b[this.c++] = input[i] } return this }