|
||||||||||
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,
java.lang.String algorithm)
Returns the digest of the target string. |
static java.lang.String |
digest(java.lang.String target,
java.lang.String algorithm)
Returns the digest of the target string. |
static byte[] |
toHMac(java.lang.String source,
byte[] secretKey)
Converts a source string to its HMAC/SHA-1 value. |
static byte[] |
toHMac(java.lang.String source,
java.lang.String secretKey)
Converts a source string to its HMAC/SHA-1 value. |
static byte[] |
toHMac256(java.lang.String source,
byte[] secretKey)
Converts a source string to its HMAC/SHA256 value. |
static byte[] |
toHMac256(java.lang.String source,
java.lang.String secretKey)
Converts a source string to its HMAC/SHA256 value. |
static java.lang.String |
toHttpDigest(java.lang.String identifier,
char[] secret,
java.lang.String realm)
Return the HTTP DIGEST hashed secret. |
static java.lang.String |
toMd5(java.lang.String target)
Returns the MD5 digest of the target string. |
static java.lang.String |
toMd5(java.lang.String target,
java.lang.String charsetName)
Returns the MD5 digest of target string. |
static java.lang.String |
toSha1(java.lang.String target)
Returns the SHA1 digest of the target string. |
static java.lang.String |
toSha1(java.lang.String target,
java.lang.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 byte[] toHMac(java.lang.String source, byte[] secretKey)
source
- The source string to convert.secretKey
- The secret key to use for conversion.
public static byte[] toHMac(java.lang.String source, java.lang.String secretKey)
source
- The source string to convert.secretKey
- The secret key to use for conversion.
public static byte[] toHMac256(java.lang.String source, byte[] secretKey)
source
- The source string to convert.secretKey
- The secret key to use for conversion.
public static byte[] toHMac256(java.lang.String source, java.lang.String secretKey)
source
- The source string to convert.secretKey
- The secret key to use for conversion.
public static java.lang.String toHttpDigest(java.lang.String identifier, char[] secret, java.lang.String realm)
identifier
- The user identifier to hash.secret
- The user secret.realm
- The authentication realm.
public static java.lang.String toMd5(java.lang.String target)
target
- The string to encode.
public static java.lang.String toMd5(java.lang.String target, java.lang.String charsetName) throws java.io.UnsupportedEncodingException
target
- The string to encode.charsetName
- The character set.
java.io.UnsupportedEncodingException
public static java.lang.String toSha1(java.lang.String target)
target
- The string to encode.
public static char[] digest(char[] target, java.lang.String algorithm)
target
- The string to encode.algorithm
- The digest algorithm to use.
public static java.lang.String digest(java.lang.String target, java.lang.String algorithm)
target
- The string to encode.algorithm
- The digest algorithm to use.
public static java.lang.String toSha1(java.lang.String target, java.lang.String charsetName) throws java.io.UnsupportedEncodingException
target
- The string to encode.charsetName
- The character set.
java.io.UnsupportedEncodingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |