Package edu.uiuc.ncsa.security.core.util
Class TokenUtil
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.util.TokenUtil
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.codec.binary.Base32
base32
static String
padding32
static char
trailingChar
-
Constructor Summary
Constructors Constructor Description TokenUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
b32DecodeToken(String b32EncodedToken)
static String
b32Encode(byte[] b)
static String
b32EncodeToken(String token)
static String
b64DecodeToken(String b64EncodedToken)
static String
b64EncodeToken(String token)
static boolean
isBase32(String x)
NOTE we have tweaked this to use underscore for padding, not the standard equals sign since we want nothing to be escaped.static boolean
isBase64(String x)
-
-
-
Field Detail
-
trailingChar
public static char trailingChar
-
padding32
public static String padding32
-
base32
protected static org.apache.commons.codec.binary.Base32 base32
-
-
Method Detail
-
b32Encode
public static String b32Encode(byte[] b)
-
isBase64
public static boolean isBase64(String x)
-
isBase32
public static boolean isBase32(String x)
NOTE we have tweaked this to use underscore for padding, not the standard equals sign since we want nothing to be escaped.- Parameters:
x
-- Returns:
-
-