assertByteLength
assertByteLength(
bytes,length,name):Uint8Array
Defined in: ootle/src/helpers/bytes.ts:16
Asserts that bytes has exactly length bytes; otherwise throws with a
descriptive message. Returns bytes so the assertion can be used inline in a
property initialiser or destructuring expression.
Message format deliberately mirrors the existing stealth-side inline checks
(e.g. Mask must be 32 bytes, got 31).
Parameters
Section titled “Parameters”Uint8Array
length
Section titled “length”number
string
Returns
Section titled “Returns”Uint8Array
Throws
Section titled “Throws”when the length does not match.