kencode

Base64

open class Base64(val alphabet: CharArray) : ByteEncoding(source)

RFC 4648–compatible Base64 encoder/decoder.

Inheritors

Constructors

Link copied to clipboard
constructor(alphabet: CharArray)

Types

Link copied to clipboard
object Default : Base64

Default Base64 instance using the standard BASE_64 alphabet.

Properties

Link copied to clipboard

The 64-character alphabet used to map 6-bit groups to characters.

Functions

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

Decode an encoded string back into the original bytes.

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

Encode the given byte range into a text representation.

Base64

constructor(alphabet: CharArray)(source)

alphabet

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.