public class MD5
extends java.lang.Object
Constructor and Description |
---|
MD5() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getHashString(java.security.MessageDigest md5) |
static java.lang.String |
getHashString(java.lang.String in)
Calculates the MD5 hash of an UTF-8 encoded string.
|
static java.lang.String |
leftPad(java.lang.String toPad,
char c,
int length)
If the string is shorter than the specified length, it is left padded
with the specified character.
|
static java.security.MessageDigest |
newInstance() |
public static java.lang.String getHashString(java.lang.String in)
public static java.security.MessageDigest newInstance()
public static java.lang.String getHashString(java.security.MessageDigest md5)
public static java.lang.String leftPad(java.lang.String toPad, char c, int length)
toPad
- The string to padc
- The character to pad withlength
- The length of the resulting string