org.codehaus.plexus.digest

Class DigestUtils

public class DigestUtils extends Object

Parse files from checksum file formats.

Author: Brett Porter

Method Summary
static StringcleanChecksum(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 StringcleanChecksum(String checksum, String algorithm, String path)

Method Detail

cleanChecksum

public 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.

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)
Copyright © 2001-2009 Codehaus. All Rights Reserved.