Package org.forgerock.android.auth.util
Class Base32String
- java.lang.Object
-
- org.forgerock.android.auth.util.Base32String
-
public class Base32String extends java.lang.ObjectEncodes 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBase32String.DecodingException
-
Constructor Summary
Constructors Modifier Constructor Description protectedBase32String(java.lang.String alphabet)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()static byte[]decode(java.lang.String encoded)protected byte[]decodeInternal(java.lang.String encoded)static java.lang.Stringencode(byte[] data)protected java.lang.StringencodeInternal(byte[] data)
-
-
-
Method Detail
-
decode
public static byte[] decode(java.lang.String encoded) throws Base32String.DecodingException- Throws:
Base32String.DecodingException
-
decodeInternal
protected byte[] decodeInternal(java.lang.String encoded) throws Base32String.DecodingException- Throws:
Base32String.DecodingException
-
encode
public static java.lang.String encode(byte[] data)
-
encodeInternal
protected java.lang.String encodeInternal(byte[] data)
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
-