Base58BTC

object Base58BTC

Provides utilities for encoding and decoding data using Base58 encoding, specifically following the Bitcoin-based Base58 alphabet.

This object supports encoding data as Base58 strings or byte arrays, and decoding Base58 strings or byte arrays back into their original form.

It uses an internal alphabet of characters "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" to exclude ambiguous characters (like 0, O, I, and l) and simplifies usage for systems like Bitcoin addresses and other cryptographic applications.

Functions

Link copied to clipboard

Decodes the given byte array of data from Base58 encoding into its original form.

fun decode(data: String): ByteArray

Decodes a Base58-encoded string into its corresponding byte array representation.

Link copied to clipboard

Encodes the given byte array using a specific encoding logic, which involves converting the byte array to a string representation and then encoding it back into a byte array.

Link copied to clipboard

Encodes the given byte array into a string representation using a custom encoding scheme.