Package org.jboss.security
Class Base64Utils
- java.lang.Object
-
- org.jboss.security.Base64Utils
-
public class Base64Utils extends Object
Base64 encoding/decoding utilities. This implementation is not MIME compliant (rfc1421). The padding in this implementation (if used) is a prefix of the output.- Author:
- Scott.Stark@jboss.org, Josef Cacek
-
-
Field Summary
Fields Modifier and Type Field Description static String
BASE16_ENCODING
static String
BASE64_ENCODING
static char
PAD
static String
REGEX
-
Constructor Summary
Constructors Constructor Description Base64Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
fromb64(String str)
static String
tob64(byte[] buffer)
static String
tob64(byte[] buffer, boolean usePadding)
-
-
-
Field Detail
-
BASE64_ENCODING
public static final String BASE64_ENCODING
- See Also:
- Constant Field Values
-
BASE16_ENCODING
public static final String BASE16_ENCODING
- See Also:
- Constant Field Values
-
PAD
public static final char PAD
- See Also:
- Constant Field Values
-
REGEX
public static final String REGEX
- See Also:
- Constant Field Values
-
-
Method Detail
-
tob64
public static String tob64(byte[] buffer)
-
tob64
public static String tob64(byte[] buffer, boolean usePadding)
-
fromb64
public static byte[] fromb64(String str) throws NumberFormatException
- Throws:
NumberFormatException
-
-