|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.id.DigestUtils
public class DigestUtils
Operations to simplifiy common MessageDigest
tasks. This
class is thread safe.
Constructor Summary | |
---|---|
DigestUtils()
|
Method Summary | |
---|---|
static byte[] |
md5(byte[] data)
Calculates the MD5 digest and returns the value as a 16 element byte[] . |
static byte[] |
md5(java.lang.String data)
Calculates the MD5 digest and returns the value as a 16 element byte[] . |
static java.lang.String |
md5Hex(byte[] data)
Calculates the MD5 digest and returns the value as a 32 character hex string. |
static java.lang.String |
md5Hex(java.lang.String data)
Calculates the MD5 digest and returns the value as a 32 character hex string. |
static byte[] |
sha(byte[] data)
Calculates the SHA digest and returns the value as a byte[] . |
static byte[] |
sha(java.lang.String data)
Calculates the SHA digest and returns the value as a byte[] . |
static java.lang.String |
shaHex(byte[] data)
Calculates the SHA digest and returns the value as a hex string. |
static java.lang.String |
shaHex(java.lang.String data)
Calculates the SHA digest and returns the value as a hex string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DigestUtils()
Method Detail |
---|
public static byte[] md5(byte[] data)
byte[]
.
data
- Data to digest
public static byte[] md5(java.lang.String data)
byte[]
.
data
- Data to digest
public static java.lang.String md5Hex(byte[] data)
data
- Data to digest
public static java.lang.String md5Hex(java.lang.String data)
data
- Data to digest
public static byte[] sha(byte[] data)
byte[]
.
data
- Data to digest
public static byte[] sha(java.lang.String data)
byte[]
.
data
- Data to digest
public static java.lang.String shaHex(byte[] data)
data
- Data to digest
public static java.lang.String shaHex(java.lang.String data)
data
- Data to digest
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |