Skip to main content

Crate mina_base58

Crate mina_base58 

Source
Expand description

Mina base58check encoding and decoding.

Implements the base58check scheme used by the Mina protocol: a single version byte followed by the payload, with a 4-byte double-SHA256 checksum appended before base58 encoding.

Modules§

version
Version bytes for Mina base58check encodings. Version bytes for Mina base58check encodings.

Enums§

DecodeError
Errors that can occur when decoding a base58check string.

Functions§

checksum 🔒
Double-SHA256 checksum of data.
checksum_verify 🔒
Constant-time comparison of two 4-byte checksums.
decode
Decode a base58check string, returning (version, payload).
decode_raw
Decode a base58check string, verify the checksum, and return the raw bytes (without the trailing checksum but including any version bytes).
decode_version
Decode a base58check string and verify the version byte.
encode
Encode payload with a leading version byte in base58check.
encode_raw
Encode raw bytes (which already contain any version/structure bytes) with an appended 4-byte double-SHA256 checksum.