kencode

BaseRadix

open class BaseRadix(alphabet: Alphabet, val blockSize: Int = 32) : ByteEncoding(source)

Generic base-N encoder/decoder for binary data using arbitrary alphabets and block processing.

Parameters

alphabet

The alphabet used to map digit values to characters.

Inheritors

Constructors

BaseRadix

constructor(alphabet: Alphabet, blockSize: Int = 32)(source)

Parameters

alphabet

The alphabet used to map digit values to characters.


constructor(chars: String, blockSize: Int = 32)(source)

Properties

blockSize

Functions

decode

open override fun decode(input: CharSequence): ByteArray(source)

Decode an encoded string back into the original bytes.

encode

open override fun encode(input: ByteArray, offset: Int = 0, length: Int = input.size - offset): String(source)

Encode the given byte range into a text representation.