kencode

ByteEncoding

interface ByteEncoding(source)

Abstraction for bidirectional byte–text encodings (e.g., Base62, Base64).

Inheritors

Functions

Link copied to clipboard
abstract fun decode(input: CharSequence): ByteArray

Decode an encoded string back into the original bytes.

Link copied to clipboard
abstract fun encode(input: ByteArray, offset: Int = 0, length: Int = input.size - offset): String

Encode the given byte range into a text representation.

decode

abstract fun decode(input: CharSequence): ByteArray(source)

Decode an encoded string back into the original bytes.

encode

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

Encode the given byte range into a text representation.