public class Md5Utils extends 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(File file)
Computes the MD5 of the given file.
|
static byte[] |
computeMD5Hash(InputStream is)
Computes the MD5 hash of the data in the given input stream and returns
it as an array of bytes.
|
static String |
md5AsBase64(byte[] input) |
static String |
md5AsBase64(File file) |
static String |
md5AsBase64(InputStream is) |
public static byte[] computeMD5Hash(InputStream is) throws IOException
is
- the input stream.IOException
public static String md5AsBase64(InputStream is) throws IOException
is
- the input stream.IOException
public static byte[] computeMD5Hash(byte[] input)
input
- the input in bytes.public static String md5AsBase64(byte[] input)
input
- the input in bytes.public static byte[] computeMD5Hash(File file) throws IOException
file
- the file.IOException
public static String md5AsBase64(File file) throws IOException
file
- the file.IOException
Copyright © 2018. All rights reserved.