edu.internet2.middleware.shibboleth.common.util
Class Base32
java.lang.Object
edu.internet2.middleware.shibboleth.common.util.Base32
public class Base32
- extends Object
Base32 - encodes and decodes 'Canonical' Base32
- Author:
- Robert Kaye & Gordon Mohr
Method Summary |
static byte[] |
decode(String base32)
Decode a Base32 string into an array of binary bytes. |
static String |
encode(byte[] bytes)
Encode an array of binary bytes into a Base32 string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base32
public Base32()
encode
public static String encode(byte[] bytes)
- Encode an array of binary bytes into a Base32 string.
Should not fail (the only possible exception is that the
returned string cannot be allocated in memory)
decode
public static byte[] decode(String base32)
throws IllegalArgumentException
- Decode a Base32 string into an array of binary bytes.
May fail if the parameter is a non canonical Base32 string
(the only other possible exception is that the
returned array cannot be allocated in memory)
- Throws:
IllegalArgumentException
Copyright © 2006-2011 Internet2. All Rights Reserved.