public class MD5 extends Object
| Constructor and Description |
|---|
MD5() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
hash(byte[] bytes)
Get the MD5 hash of the given byte array.
|
static byte[] |
hash(File file)
Get the MD5 hash of the given file.
|
static String |
of(byte[] bytes)
Return the MD5 HEX sum of the given byte array.
|
static String |
of(File file)
Return the MD5 HEX sum of the given file.
|
static String |
sum(byte[] bytes)
Return the MD5 HEX sum of a hashed MD5 byte array.
|
public static String sum(byte[] bytes)
bytes - the hashed MD5 byte arraypublic static byte[] hash(byte[] bytes)
throws IOException
bytes - a byte arrayIOException - if an I/O error occurspublic static byte[] hash(File file) throws IOException
file - file to compute a hash onIOException - if file cannot be foundpublic static String of(byte[] bytes) throws IOException
bytes - a byte arrayIOException - if an I/O error occurspublic static String of(File file) throws IOException
file - the file to get the MD5 sum ofIOException - if an I/O error occursCopyright © 2013. All Rights Reserved.