Crate fd_bs58

Crate fd_bs58 

Source
Expand description

An optimized implementation of Base58 encoding/decoding for 32 and 64 byte numbers. This library is based off of the original C implementation from Jump Crypto’s Firedancer repo which can be found here. These algorithms are significantly faster than the commonly used bs58 library for 32 and 64 bytes.

§Performance vs. bs58

AlgorithmSpeedup
encode_32~9x
encode_64~13x
decode_32~3x
decode_64~5x

Modules§

constants
decode_32
decode_64
encode_32
encode_64

Enums§

Error

Functions§

decode_32
Decodes the given base58 string into 32 bytes using an optimized decoding algorithm. This function will return an error if the string is not base58 encoded or the result is not 32 bytes.
decode_64
Decodes the given base58 string into 64 bytes using an optimized decoding algorithm. This function will return an error if the string is not base58 encoded or the result is not 64 bytes.
encode_32
Encodes the given 32 bytes using an optimized base58 encoding algorithm.
encode_64
Encodes the given 64 bytes using an optimized base58 encoding algorithm.