## 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
`static java.lang.String` `ROLE`

Method Summary
`java.lang.String` `calc(java.io.File file)` Calculate a checksum for a file.
`java.lang.String` `getAlgorithm()` Get the algorithm used for the checksum.
`java.lang.String` `getFilenameExtension()` The filename extension for this digester.
`void` `verify(java.io.File file, java.lang.String checksum)` Verify that a checksum is correct.

Field Detail

### ROLE

    static final java.lang.String ROLE

Method Detail

### getAlgorithm

    java.lang.String getAlgorithm()

  Get the algorithm used for the checksum.

  Returns:
    the algorithm

### getFilenameExtension

    java.lang.String getFilenameExtension()

  The filename extension for this digester.

  Returns:
    the filename extension.

### calc

    java.lang.String calc(java.io.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(java.io.File file,
                java.lang.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.

Copyright © 2011. All Rights Reserved.