Default

Base 32 Default encoding/decoding in accordance with RFC 4648 section 6.

https://www.ietf.org/rfc/rfc4648.html#section-6

e.g.

val base32Default = Base32Default {
    isLenient = true
    lineBreakInterval = 64
    encodeToLowercase = false
    padEncoded = true
}

val text = "Hello World!"
val bytes = text.encodeToByteArray()
val encoded = bytes.encodeToString(base32Default)
println(encoded) // JBSWY3DPEBLW64TMMQQQ====

// Alternatively, use the static implementaton instead of
// configuring your own settings.
val decoded = encoded.decodeToByteArray(Base32.Default).decodeToString()
assertEquals(text, decoded)

See also

Constructors

Link copied to clipboard
constructor(config: Base32.Default.Config)

Types

Link copied to clipboard

Doubles as a static implementation with default settings and a lineBreakInterval of 64.

Link copied to clipboard

Configuration for Base32.Default encoding/decoding.

Functions

Link copied to clipboard
protected open override fun name(): String
Link copied to clipboard
Link copied to clipboard