public class MD5Sum
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MD5_BUFFER_SIZE |
static int |
SCOUR_MD5_BYTE_LIMIT |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getFileMD5Sum(java.io.File f)
Method: getFileMD5Sum Purpose: get the MD5 sum of a file.
|
static java.lang.String |
md5Sum(byte[] input)
MD5Sum the byte array
|
static java.lang.String |
md5Sum(byte[] input,
int limit)
mdsum the byte array with a limit
|
static java.lang.String |
md5Sum(java.lang.String str)
Method: md5Sum Purpose: calculate the MD5 in a way compatible with how
the scour.net protocol encodes its passwords (incidentally, it also
outputs a string identical to the md5sum unix command).
|
public static final int SCOUR_MD5_BYTE_LIMIT
public static final int MD5_BUFFER_SIZE
public static java.lang.String md5Sum(java.lang.String str)
str - the String from which to calculate the sumpublic static java.lang.String md5Sum(byte[] input)
input - to sumpublic static java.lang.String md5Sum(byte[] input,
int limit)
input - to sumlimit - to stop atpublic static java.lang.String getFileMD5Sum(java.io.File f)
throws java.io.IOException,
MD5CryptException
f - the file to readjava.io.IOException - on IO errorMD5CryptException - on getting MD5 MessageDigest instance