public class Hasher
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MD5 |
static java.lang.String |
SHA1 |
Constructor and Description |
---|
Hasher() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
hash(java.io.File file,
java.lang.String alg) |
static java.lang.String |
md5(java.io.File file) |
static java.lang.String |
md5(java.lang.String fileName) |
static java.lang.String |
sha1(java.io.File file) |
static java.lang.String |
sha1(java.lang.String fileName) |
public static final java.lang.String SHA1
public static final java.lang.String MD5
public static byte[] hash(java.io.File file, java.lang.String alg) throws java.io.IOException, java.security.NoSuchAlgorithmException
java.io.IOException
java.security.NoSuchAlgorithmException
public static java.lang.String md5(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.lang.String md5(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public static java.lang.String sha1(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.lang.String sha1(java.lang.String fileName) throws java.io.IOException
java.io.IOException