Raw Bytes (32-bit)

class c104.Byte32

This object is compatible to native bytes and ensures that the length of the bytes is exactly 32 bit.

__init__(self, value: Union[bytes, int]) None

create a new fixed-length bytes representation

Parameters:

value (Union[bytes, int]) – native byte data

Raises:

OverflowError – cannot convert value into 4 bytes representation

Example

>>> fixed_byte32 = c104.Byte32(0b10101010111)