Expand description
Fixed-width Bitcoin Base58 for 32- and 64-byte values.
Braid58 is allocation-free.
Cargo target features select the scalar, AVX2, or AVX-512 backend at compile time.
The avx2 and avx512 features explicitly require those SIMD backends.
Enabling either feature makes the resulting binary require the corresponding ISA.
let bytes = [42_u8; 32];
let encoded = braid58::encode_32(&bytes);
let decoded = braid58::decode_32(encoded.as_str())?;
assert_eq!(decoded, bytes);
let wide = [7_u8; 64];
let encoded = braid58::encode_64(&wide);
assert_eq!(braid58::decode_64(&encoded)?, wide);Structs§
- Decode
Error - An invalid, overflowing, or noncanonical fixed-width Base58 value.
- Encoded32
- An encoded 32-byte value.
- Encoded64
- An encoded 64-byte value.
Constants§
- BINARY_
32_ SIZE - The decoded width accepted and produced by the 32-byte API.
- BINARY_
64_ SIZE - The decoded width accepted and produced by the 64-byte API.
- BINARY_
SIZE - The decoded width accepted and produced by the original 32-byte API.
- MAX_
ENCODED_ 32_ LEN - The maximum encoded length of a 32-byte value.
- MAX_
ENCODED_ 64_ LEN - The maximum encoded length of a 64-byte value.
- MAX_
ENCODED_ LEN - The maximum encoded length of the original 32-byte API.
Functions§
- decode_
32 - Decodes a canonical Bitcoin Base58 value into exactly 32 bytes.
- decode_
64 - Decodes a canonical Bitcoin Base58 value into exactly 64 bytes.
- decode_
32_ into - Decodes into an existing 32-byte buffer.
- decode_
64_ into - Decodes into an existing 64-byte buffer.
- encode_
32 - Encodes exactly 32 bytes with the Bitcoin Base58 alphabet.
- encode_
64 - Encodes exactly 64 bytes with the Bitcoin Base58 alphabet.
- encode_
32x2 - Encodes two independent 32-byte values through the fixed x2 entry point.
- encode_
32x3 - Encodes three independent 32-byte values through the fixed x3 entry point.
- encode_
64x2 - Encodes two independent 64-byte values through the fixed x2 entry point.
- encode_
64x3 - Encodes three independent 64-byte values through the fixed x3 entry point.