class

Beryl::TLS::Messages::MessageReader

Inherits Reference < Object

Reads the TLS presentation language (RFC 9846 ยง3) from bytes, sans-IO. Every read checks the bytes left before it indexes; a short or overlong input raises Error with decode_error, never IndexError.

Constructors

new(bytes : Bytes)
Source

Instance methods

at_end?
Source
finish

Raises unless every byte was read.

Source
offset
Source
read_bytes(count : Int32) : Bytes
Source
read_u16
Source
read_u24
Source
read_u32
Source
read_u8
Source
read_vector16(minimum : Int32 = 0) : Bytes

Reads a vector with a two-byte length.

Source
read_vector24(minimum : Int32 = 0) : Bytes

Reads a vector with a three-byte length.

Source
read_vector8(minimum : Int32 = 0) : Bytes

Reads a vector with a one-byte length.

Source
remaining
Source