org.codehaus.plexus.digest

## Class DigestUtils

- java.lang.Object
- - org.codehaus.plexus.digest.DigestUtils

    public class DigestUtils
    extends Object

Parse files from checksum file formats.

Author:
  Brett Porter

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `cleanChecksum(String rawChecksum, Digester digester, String expectedFilename)` Take a raw checksum string and verify that it matches the expectedFilename and digester, then return the trimmed checksum string.
`static String` `cleanChecksum(String checksum, String algorithm, String path)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### cleanChecksum

    public static String cleanChecksum(String rawChecksum,
                                       Digester digester,
                                       String expectedFilename)
                                throws DigesterException

Take a raw checksum string and verify that it matches the expectedFilename and digester, then return the trimmed checksum string.

Parameters:
  `rawChecksum` - the raw checksum string that may include the filename.
  `digester` - the expected digester for this checksum string.
Returns:
  the trimmed checksum string (no filename portion)
Throws:
  `DigesterException` - if there was a problem verifying the checksum string.

#### cleanChecksum

    public static String cleanChecksum(String checksum,
                                       String algorithm,
                                       String path)
                                throws DigesterException

Throws:
  `DigesterException`