Package org.codehaus.plexus.digest
Interface Digester
- All Known Implementing Classes:
AbstractDigester,Md5Digester,Sha1Digester,Sha256Digester
public interface Digester
Create a digest for a file.
- Author:
- Brett Porter
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionCalculate a checksum for a file.Get the algorithm used for the checksum.The filename extension for this digester.voidVerify that a checksum is correct.
-
Field Details
-
ROLE
ConstantROLE="Digester.class.getName()"
-
-
Method Details
-
getAlgorithm
String getAlgorithm()Get the algorithm used for the checksum.- Returns:
- the algorithm
-
getFilenameExtension
String getFilenameExtension()The filename extension for this digester.- Returns:
- the filename extension.
-
calc
Calculate a checksum for a file.- Parameters:
file- the file to calculate the checksum for- Returns:
- the current checksum.
- Throws:
DigesterException- if there was a problem computing the hashcode.
-
verify
Verify that a checksum is correct.- Parameters:
file- the file to compute the checksum forchecksum- the checksum to compare to- Throws:
DigesterException- if there was a problem computing the hashcode.
-