]> git.codecow.com Git - nano25519.git/commitdiff
Fix Uint32Array length.
authorChris Duncan <chris@codecow.com>
Sat, 26 Sep 2026 08:37:19 +0000 (01:37 -0700)
committerChris Duncan <chris@codecow.com>
Sat, 26 Sep 2026 08:37:19 +0000 (01:37 -0700)
src/lib/primordials.ts

index 6c67d63f47e4a917ff4e1a834c6efd19cbd7a599..b85fe56ebc5d52ff3501a6fe4721723fc3556e77 100644 (file)
@@ -147,7 +147,7 @@ export function words (bytes: Bytes): Words {
        if (offset !== 0) {
                throw new Nano25519RangeError('Unexpected byte offset', { cause: offset })
        }
-       return new Words(bytes.buffer, 0, getByteLength.call(bytes))
+       return new Words(bytes.buffer, 0, getByteLength.call(bytes) >> 2)
 }
 
 const LOWER = '0123456789abcdef'