public class DigesterUtils extends Object
Constructor and Description |
---|
DigesterUtils() |
Modifier and Type | Method and Description |
---|---|
static char[] |
encodeHex(byte[] data)
Blatantly copied from commons-codec version 1.3
|
static String |
getMd5Digest(File file)
Calculates a SHA1 digest for a file.
|
static String |
getMd5Digest(InputStream is)
Calculates a SHA1 digest for a stream.
|
static String |
getMd5Digest(String content)
Calculates a SHA1 digest for a string.
|
static String |
getSha1Digest(File file)
Calculates a SHA1 digest for a file.
|
static String |
getSha1Digest(InputStream is)
Calculates a SHA1 digest for a stream.
|
static String |
getSha1Digest(String content)
Calculates a SHA1 digest for a string.
|
public static String getSha1Digest(String content)
content
- public static String getSha1Digest(InputStream is)
is
- public static String getSha1Digest(File file) throws IOException
file
- IOException
public static String getMd5Digest(String content)
content
- public static String getMd5Digest(InputStream is)
is
- public static String getMd5Digest(File file) throws IOException
file
- IOException
public static char[] encodeHex(byte[] data)
data
- Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.