org.codehaus.plexus.digest
Class DigestUtils
java.lang.Object
org.codehaus.plexus.digest.DigestUtils
public class DigestUtils
- extends java.lang.Object
Parse files from checksum file formats.
- Author:
- Brett Porter
Method Summary |
static java.lang.String |
cleanChecksum(java.lang.String rawChecksum,
Digester digester,
java.lang.String expectedFilename)
Take a raw checksum string and verify that it matches the expectedFilename and digester, then
return the trimmed checksum string. |
static java.lang.String |
cleanChecksum(java.lang.String checksum,
java.lang.String algorithm,
java.lang.String path)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cleanChecksum
public static java.lang.String cleanChecksum(java.lang.String rawChecksum,
Digester digester,
java.lang.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 java.lang.String cleanChecksum(java.lang.String checksum,
java.lang.String algorithm,
java.lang.String path)
throws DigesterException
- Throws:
DigesterException
Copyright © 2011. All Rights Reserved.