|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.ext.crypto.DigestUtils
public class DigestUtils
Security data manipulation utilities.
Method Summary | |
---|---|
static char[] |
digest(char[] target,
String algorithm)
Returns the digest of the target string. |
static String |
digest(String target,
String algorithm)
Returns the digest of the target string. |
static byte[] |
toHMacSha1(String source,
byte[] secretKey)
Converts a source string to its HMAC/SHA-1 value. |
static byte[] |
toHMacSha1(String source,
String secretKey)
Converts a source string to its HMAC/SHA-1 value. |
static byte[] |
toHMacSha256(String source,
byte[] secretKey)
Converts a source string to its HMAC/SHA256 value. |
static byte[] |
toHMacSha256(String source,
String secretKey)
Converts a source string to its HMAC/SHA256 value. |
static String |
toHttpDigest(String identifier,
char[] secret,
String realm)
Return the HTTP DIGEST hashed secret. |
static String |
toMd5(String target)
Returns the MD5 digest of the target string. |
static String |
toMd5(String target,
String charsetName)
Returns the MD5 digest of target string. |
static String |
toSha1(String target)
Returns the SHA1 digest of the target string. |
static String |
toSha1(String target,
String charsetName)
Returns the SHA1 digest of target string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static char[] digest(char[] target, String algorithm)
target
- The string to encode.algorithm
- The digest algorithm to use.
public static String digest(String target, String algorithm)
target
- The string to encode.algorithm
- The digest algorithm to use.
public static byte[] toHMacSha1(String source, byte[] secretKey)
source
- The source string to convert.secretKey
- The secret key to use for conversion.
public static byte[] toHMacSha1(String source, String secretKey)
source
- The source string to convert.secretKey
- The secret key to use for conversion.
public static byte[] toHMacSha256(String source, byte[] secretKey)
source
- The source string to convert.secretKey
- The secret key to use for conversion.
public static byte[] toHMacSha256(String source, String secretKey)
source
- The source string to convert.secretKey
- The secret key to use for conversion.
public static String toHttpDigest(String identifier, char[] secret, String realm)
identifier
- The user identifier to hash.secret
- The user secret.realm
- The authentication realm.
public static String toMd5(String target)
target
- The string to encode.
public static String toMd5(String target, String charsetName) throws UnsupportedEncodingException
target
- The string to encode.charsetName
- The character set.
UnsupportedEncodingException
public static String toSha1(String target)
target
- The string to encode.
public static String toSha1(String target, String charsetName) throws UnsupportedEncodingException
target
- The string to encode.charsetName
- The character set.
UnsupportedEncodingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |