Kodium Core
Package-level declarations
Types
Functions
[common] fun String.decodeBase58(): ByteArray Decodes the current string, which is encoded in Base58 format, into a byte array. Base58 is a binary-to-text encoding designed to create shorter and more human-readable strings without problematic characters that are easily confused (e.g., '0' and 'O').
[common] fun String.decodeBase58WithChecksum(): ByteArray Decodes a Base58-encoded string with a checksum validation. The method first decodes the Base58 string, separates the checksum from the payload, computes the checksum of the payload, and verifies it against the decoded checksum. If the checksum validation fails, an exception is thrown.
[common] fun ByteArray.encodeToBase58String(): String Encodes a byte array into a Base58-encoded string. Base58 encoding is typically used for encoding binary data in a format that is easier for humans to work with, such as in the case of cryptocurrency addresses or other identifiers.
[common] fun ByteArray.encodeToBase58WithChecksum(): String Encodes the current byte array to a Base58-encoded string with an appended checksum. The checksum is generated by applying a double SHA-256 hash to the byte array and then appending the first four bytes of the result to the original array before encoding.
Last updated