Class JavaSha1ChecksumGenerator
- java.lang.Object
-
- org.spdx.utility.verificationcode.JavaSha1ChecksumGenerator
-
- All Implemented Interfaces:
IFileChecksumGenerator
public class JavaSha1ChecksumGenerator extends Object implements IFileChecksumGenerator
Java sha1 checksum generator using MessageDigest- Author:
- Gary O'Neall
-
-
Constructor Summary
Constructors Constructor Description JavaSha1ChecksumGenerator()
Create a SHA1 based checksum generator
-
-
-
Constructor Detail
-
JavaSha1ChecksumGenerator
public JavaSha1ChecksumGenerator() throws NoSuchAlgorithmException
Create a SHA1 based checksum generator- Throws:
NoSuchAlgorithmException
- if the SHA1 algorithm does not exist
-
-
Method Detail
-
getFileChecksum
public String getFileChecksum(File file) throws IOException
- Specified by:
getFileChecksum
in interfaceIFileChecksumGenerator
- Parameters:
file
- File to generate the checksum for- Returns:
- the checksum for the file
- Throws:
IOException
- on errors reading the file
-
-