|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.salespointframework.core.users.MD5
public final class MD5
An class for generating a securly encoded passwort string using the MD5 algorithm
Field Summary | |
---|---|
private static char[] |
chHexchar
An Array with all hexadecimal characters. |
private static java.security.MessageDigest |
md5
The MD5 generator. |
Constructor Summary | |
---|---|
MD5()
|
Method Summary | |
---|---|
static java.lang.String |
byteToHex(byte[] b)
Converts a byte-Array to hexadecimal string |
static byte[] |
digestBytes(byte[] bData)
Retrieves a byte sequence representing the MD5 digest of the specified byte sequence. |
static byte[] |
digestString(java.lang.String sPhrase)
Retrieves a byte sequence that represents the MD5 digest string. |
static java.lang.String |
encodeString(java.lang.String sPhrase)
Retrieves a hexadecimal character sequence representing the MD5 digest of the specified character sequence by using ISO-8859-1 encoding |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.security.MessageDigest md5
private static final char[] chHexchar
Constructor Detail |
---|
public MD5()
Method Detail |
---|
public static final java.lang.String encodeString(java.lang.String sPhrase) throws java.lang.RuntimeException
sPhrase
- the string to encode.
java.lang.RuntimeException
- if an MD5 digest algorithm is not available through the java.security.MessageDigest spipublic static java.lang.String byteToHex(byte[] b)
b
- the byte[] to be converted
public static byte[] digestString(java.lang.String sPhrase) throws java.lang.RuntimeException
sPhrase
- the string to digest.
java.lang.RuntimeException
- if an MD5 digest algorithm is not available through the java.security.MessageDigest spipublic static final byte[] digestBytes(byte[] bData) throws java.lang.RuntimeException
bData
- the data to digest.
java.lang.RuntimeException
- if an MD5 digest algorithm is not available through the java.security.MessageDigest spi
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |