|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.acorn.security.MD5
public abstract class MD5
A static MD5 digest encoder.
The MD5 data contains 32 four bit sequences of hex chars.
| Field Summary | |
|---|---|
static int |
LENGTH
The MD5 hash length. |
| Constructor Summary | |
|---|---|
MD5()
|
|
| Method Summary | |
|---|---|
static byte[] |
digest(byte[] data)
Calculates the digest for the specified data. |
static byte[] |
digest(String string)
Calculates the digest for the specified string by applying platform's default encoding. |
static byte[] |
digest(String string,
String encoding)
Calculates the digest for the specified string by applying the specified encoding. |
static String |
encode(byte[] data)
Encodes MD5 data into a 32 char MD5 string. |
static String |
encode(String string)
Encodes a string into a 32 char MD5 string by calculating the digest using the specified string and encoding the resulting MD5 data. |
static String |
encode(String string,
String encoding)
Encodes a string into a 32 char MD5 string by calculating the digest using the specified string and encoding the resulting MD5 data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LENGTH
| Constructor Detail |
|---|
public MD5()
| Method Detail |
|---|
public static final String encode(String string)
string - the string to encode.
public static final String encode(String string,
String encoding)
string - the string to encode.encoding - the character encoding.
public static final String encode(byte[] data)
data - an array containing the digest.
public static final byte[] digest(String string)
string - the update string.
IllegalStateException - if a digest generator is not available.
public static final byte[] digest(String string,
String encoding)
string - the update string.encoding - the character encoding.
IllegalStateException - if a digest generator is not available.public static final byte[] digest(byte[] data)
data - the update data.
NullPointerException - if a digest generator is not available.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||