public class HashGenerationUtils extends Object
| Constructor and Description |
|---|
HashGenerationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
generateBytesHash(byte[] bytes,
String algorithm) |
static String |
generateFileHash(File file,
String algorithm) |
static String |
generateMD5Hash(File file) |
static String |
generateSHA1Hash(File file) |
public static String generateMD5Hash(File file) throws IOException, NoSuchAlgorithmException
IOExceptionNoSuchAlgorithmExceptionpublic static String generateSHA1Hash(File file) throws IOException, NoSuchAlgorithmException
IOExceptionNoSuchAlgorithmExceptionpublic static String generateFileHash(File file, String algorithm) throws IOException, NoSuchAlgorithmException
IOExceptionNoSuchAlgorithmExceptionpublic static String generateBytesHash(byte[] bytes, String algorithm) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionCopyright © 2019. All rights reserved.