Asserts that the buffer is of a specific length.
The buffer to validate.
Descriptive context for error messages.
The expected number of bytes that the buffer can contain.
Asserts that the buffer is of a specific length.
Throws