Expand description
Pure Rust implementation of Base32 (RFC 4648).
Implements Base32 variants without data-dependent branches or lookup tables, thereby providing portable “best effort” constant-time operation. Not constant-time with respect to message length (only data).
Supports no_std
environments and avoids heap allocations in the core API
(but also provides optional alloc
support for convenience).
Adapted from: https://github.com/paragonie/constant_time_encoding/blob/master/src/Base32.php
Structs§
- Base32
- RFC4648 lower case Base32 encoding with
=
padding. - Base32
Unpadded - RFC4648 lower case Base32 encoding without padding.
- Base32
Upper - RFC4648 upper case Base32 encoding with
=
padding. - Base32
Upper Unpadded - RFC4648 upper case Base32 encoding without padding.
Enums§
- Error
- Error type
Traits§
- Encoding
- Core encoder/decoder functions for a particular Base32 alphabet
Functions§
- encoded_
len - Get the length of Base32 produced by encoding the given amount of bytes.