Base32String

open class Base32String

Encodes arbitrary byte arrays as case-insensitive base-32 strings.

The implementation is slightly different than in RFC 4648. During encoding, padding is not added, and during decoding the last incomplete chunk is not taken into account. The result is that multiple strings decode to the same byte array, for example, string of sixteen 7s ("7...7") and seventeen 7s both decode to the same byte array. TODO(sarvar): Revisit this encoding and whether this ambiguity needs fixing.

Author

sweis@google.com (Steve Weis)

Neal Gafter

Types

Link copied to clipboard

Functions

Link copied to clipboard
open fun clone(): Any
Link copied to clipboard
open fun decode(encoded: String): Array<Byte>
Link copied to clipboard
open fun encode(data: Array<Byte>): String