Package jodd.util
Class Base32
- java.lang.Object
-
- jodd.util.Base32
-
public class Base32 extends java.lang.ObjectBase32 encoding. Quite fast.
-
-
Field Summary
Fields Modifier and Type Field Description private static char[]CHARSprivate static java.lang.StringERR_CANONICAL_ENDprivate static java.lang.StringERR_CANONICAL_LENprivate static java.lang.StringERR_INVALID_CHARSprivate static byte[]LOOKUP
-
Constructor Summary
Constructors Constructor Description Base32()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]decode(java.lang.String base32)Decode a Base32 string into an array of binary bytes.static java.lang.Stringencode(byte[] bytes)Encode an array of binary bytes into a Base32 string.
-
-
-
Field Detail
-
ERR_CANONICAL_LEN
private static final java.lang.String ERR_CANONICAL_LEN
- See Also:
- Constant Field Values
-
ERR_CANONICAL_END
private static final java.lang.String ERR_CANONICAL_END
- See Also:
- Constant Field Values
-
ERR_INVALID_CHARS
private static final java.lang.String ERR_INVALID_CHARS
- See Also:
- Constant Field Values
-
CHARS
private static final char[] CHARS
-
LOOKUP
private static final byte[] LOOKUP
-
-
Method Detail
-
encode
public static java.lang.String encode(byte[] bytes)
Encode an array of binary bytes into a Base32 string.
-
decode
public static byte[] decode(java.lang.String base32) throws java.lang.IllegalArgumentExceptionDecode a Base32 string into an array of binary bytes.- Throws:
java.lang.IllegalArgumentException
-
-