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.

Constructors

Link copied to clipboard
protected constructor(alphabet: String)

Types

Link copied to clipboard

Properties

Link copied to clipboard
private open var ALPHABET: String
Link copied to clipboard
private open var CHAR_MAP: HashMap<Character, Integer>
Link copied to clipboard
private open var DIGITS: Array<Char>
Link copied to clipboard
private val INSTANCE: Base32String
Link copied to clipboard
private open var MASK: Int
Link copied to clipboard
val SEPARATOR: String = "-"
Link copied to clipboard
private open var SHIFT: Int

Functions

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