public class Md5Utils
extends java.lang.Object
Constructor and Description |
---|
Md5Utils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
computeMD5Hash(byte[] input)
Computes the MD5 hash of the given data and returns it as an array of
bytes.
|
static byte[] |
computeMD5Hash(java.io.File file)
Computes the MD5 of the given file.
|
static byte[] |
computeMD5Hash(java.io.InputStream is)
Computes the MD5 hash of the data in the given input stream and returns
it as an array of bytes.
|
static java.lang.String |
md5AsBase64(byte[] input) |
static java.lang.String |
md5AsBase64(java.io.File file) |
static java.lang.String |
md5AsBase64(java.io.InputStream is) |
public static byte[] computeMD5Hash(java.io.InputStream is) throws java.io.IOException
is
- the input stream.java.io.IOException
public static java.lang.String md5AsBase64(java.io.InputStream is) throws java.io.IOException
is
- the input stream.java.io.IOException
public static byte[] computeMD5Hash(byte[] input)
input
- the input in bytes.public static java.lang.String md5AsBase64(byte[] input)
input
- the input in bytes.public static byte[] computeMD5Hash(java.io.File file) throws java.io.IOException
file
- the file.java.io.IOException
public static java.lang.String md5AsBase64(java.io.File file) throws java.io.IOException
file
- the file.java.io.IOException