org.codehaus.plexus.digest

## Interface Digester

All Known Implementing Classes:
  AbstractDigester, Md5Digester, Sha1Digester

    public interface Digester

Create a digest for a file.

Author:
  Brett Porter

### Field Summary

Fields
`static String` `ROLE`

### Method Summary

All Methods Instance Methods Abstract Methods
`String` `calc(File file)` Calculate a checksum for a file.
`String` `getAlgorithm()` Get the algorithm used for the checksum.
`String` `getFilenameExtension()` The filename extension for this digester.
`void` `verify(File file, String checksum)` Verify that a checksum is correct.

### Field Detail

#### ROLE

    static final String ROLE

### Method Detail

#### 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

    String calc(File file)
         throws DigesterException

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

    void verify(File file,
                String checksum)
         throws DigesterException

Verify that a checksum is correct.

Parameters:
  `file` - the file to compute the checksum for
  `checksum` - the checksum to compare to
Throws:
  `DigesterException` - if there was a problem computing the hashcode.