|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.security.helper.MessageDigestHelper
public class MessageDigestHelper
Helper class to perform secure one-way hash operations on arbitrary text
values using the java.security.MessageDigest
class.
Constructor Summary | |
---|---|
MessageDigestHelper()
Default constructor |
Method Summary | |
---|---|
java.lang.String |
digestToBase64(java.lang.String message,
java.lang.String algorithm)
Perform a digest on the given string and return a Base64 representation. |
java.lang.String |
digestToBase64(java.lang.String message,
java.lang.String algorithm,
java.lang.String encoding)
Perform a digest on the given string and return a Base64 representation. |
java.lang.String |
digestToHex(java.lang.String message,
java.lang.String algorithm)
Perform a digest on the given string and return a hexadecimal representation. |
java.lang.String |
digestToHex(java.lang.String message,
java.lang.String algorithm,
java.lang.String encoding)
Perform a digest on the given string and return a hexadecimal representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageDigestHelper()
Method Detail |
---|
public java.lang.String digestToHex(java.lang.String message, java.lang.String algorithm, java.lang.String encoding) throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException
message
- String containing the data to perform the digest on.algorithm
- String indicating which digest algorithm to use.encoding
- String containing a valid charset name.
java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException
public java.lang.String digestToHex(java.lang.String message, java.lang.String algorithm) throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException
message
- String containing the data to perform the digest on.algorithm
- String indicating which digest algorithm to use.
java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException
public java.lang.String digestToBase64(java.lang.String message, java.lang.String algorithm, java.lang.String encoding) throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException
message
- String containing the data to perform the digest on.algorithm
- String indicating which digest algorithm to use.encoding
- String containing a valid charset name.
java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException
public java.lang.String digestToBase64(java.lang.String message, java.lang.String algorithm) throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException
message
- String containing the data to perform the digest on.algorithm
- String indicating which digest algorithm to use.
java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |