In valueToKey, when you convert from Uint8Array or other data view (tested by ArrayBuffer.isView), the code currently returns new Uint8Array(input.buffer).buffer. This disregards the byteOffset and byteLength, which might only reference a slice of the underlying ArrayBuffer.
In
valueToKey
, when you convert fromUint8Array
or other data view (tested byArrayBuffer.isView
), the code currently returnsnew Uint8Array(input.buffer).buffer
. This disregards thebyteOffset
andbyteLength
, which might only reference a slice of the underlying ArrayBuffer.