public interface IMessageDigest
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDigest(byte[] b)
Generate a message digest for the given byte array.
|
java.lang.String |
getDigest(java.lang.String s)
Generate a message digest for the given String, interpreting the String with the "UTF-8" encoding.
|
java.lang.String |
getDigest(java.lang.String s,
java.lang.String enc)
Generate a message digest for the given String, using a specified encoding to interpret the String.
|
java.lang.String getDigest(java.lang.String s)
s
- The String to calculate the message digest for.java.lang.String getDigest(java.lang.String s, java.lang.String enc)
s
- The String to calculate the hash for.enc
- The Java name of the encoding. UTF-8 is strongly advised, as not all String encodings will be supported on all platforms and devices.java.lang.String getDigest(byte[] b)