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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
Copyright © 2001-2011 Codehaus. All Rights Reserved.