encoding/base58/src/base58_xmr library

Monero's block-based variant of Base58.

Standard Base58 (see base58_base.dart) can't be applied to a long byte string directly and safely, because how many characters a given value encodes to isn't fixed - it depends on the value's magnitude, not just its byte length. Monero addresses need a fixed character count for a given byte count, so instead it splits the data into 8-byte blocks, Base58-encodes each block on its own, and left-pads each block's output up to a block-size-specific fixed width. A final partial block (< 8 bytes) is encoded the same way, padded to a shorter fixed width looked up from Base58XmrConst.blockEncByteLens.

Classes

Base58XmrConst
Block sizing constants for Monero's Base58 variant.
Base58XmrDecoder
Decodes strings produced by Base58XmrEncoder.
Base58XmrEncoder
Encodes bytes using Monero's block-based Base58 variant.