Package javatapas.io
Class GenerateFileHash
java.lang.Object
javatapas.io.GenerateFileHash
public class GenerateFileHash extends Object
Generate a File Hash from a source file.
Published at https://www.javatapas.com/io/Java-Generate-File-Hash.html
Javadoc at https://www.javatapas.com/docs/javatapas/io/GenerateFileHash.html
Published at https://www.javatapas.com/io/Java-Generate-File-Hash.html
Javadoc at https://www.javatapas.com/docs/javatapas/io/GenerateFileHash.html
- Version:
- 2021-05-18
- Author:
- Kodiak Brown
-
Constructor Summary
Constructors Constructor Description GenerateFileHash()
-
Method Summary
Modifier and Type Method Description static String
generateFileHash(File inFile, String algorithm)
-
Constructor Details
-
GenerateFileHash
public GenerateFileHash()
-
-
Method Details
-
generateFileHash
public static String generateFileHash(File inFile, String algorithm) throws IOException, NoSuchAlgorithmException- Parameters:
inFile
- The name of the input file that the hash will be created from.algorithm
- The hash algorithm to use (e.g. MD5,SHA-1,SHA-256).- Throws:
IOException
NoSuchAlgorithmException
-