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)
Content copied to clipboard
See also
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 newDecoderFeedProtected(out: Decoder.OutFeed): Decoder.Feed<Base32.Default.Config>
Link copied to clipboard
protected open override fun newEncoderFeedProtected(out: Encoder.OutFeed): Encoder.Feed<Base32.Default.Config>