/** Captured version of `DataView` reusing input offset and length. */
export function view (bytes: Bytes): View {
- return new View(getBuffer.call(bytes), getByteOffset.call(bytes), getByteLength.call(bytes))
+ return new View(getBuffer.call(bytes) as ArrayBuffer, getByteOffset.call(bytes), getByteLength.call(bytes))
}
/**
if (offset !== 0) {
throw new Nano25519RangeError('Unexpected byte offset', { cause: offset })
}
- return new Words(bytes.buffer, 0, getByteLength.call(bytes) >> 2)
+ return new Words(getBuffer.call(bytes) as ArrayBuffer, 0, getByteLength.call(bytes) >> 2)
}
const LOWER = '0123456789abcdef'