Skip to main content

Module encoding

Module encoding 

Source
Expand description

Shared encoding support.

Enums§

ByteOrder
Byte order used when encoding/decoding field elements as bytestrings.
DecodeError
Possible errors in variable-time integer decoding methods.

Traits§

ArrayDecoding
Support for decoding a Array as a big integer.
ArrayEncoding
Support for encoding a big integer as a Array.
EncodedSize
A trait mapping between encoded representations of integers.
Encoding
Encoding support.

Functions§

truncate_be 🔒
Interpret bytes as a big endian integer and extract bits_precision number of least significant bits, returning a truncated input if it exceeds the requested precision.
truncate_le 🔒
Interpret bytes as a little endian integer and extract bits_precision number of least significant bits, returning a truncated input if it exceeds the requested precision.

Type Aliases§

ByteArray
Alias for a byte array whose size is defined by ArrayEncoding::ByteSize.