Class Base32
java.lang.Object
com.codename1.security.Base32
Base32 encoder/decoder per RFC 4648. Mostly useful for OTP shared secrets, which are conventionally distributed as Base32 strings (the format embedded in QR codes by authenticator apps).
Example
byte[] secret = Base32.decode("JBSWY3DPEHPK3PXP");
String enc = Base32.encode(secret);
-
Method Summary
-
Method Details
-
encode
Encodes the bytes as a Base32 string (uppercase, with=padding). -
decode
Decodes a Base32 string. Padding and whitespace are tolerated; mixed case is accepted.
-