org.apache.maven.shared.repository.utils
Class DigestUtils

java.lang.Object
  extended by org.apache.maven.shared.repository.utils.DigestUtils

public final class DigestUtils
extends Object

Create a digest for a file. Stolen from repository-utils - once released, use that instead.

Author:
Brett Porter

Method Summary
static String createChecksum(File file, String algorithm)
           
 boolean verifyChecksum(File file, String checksum, String algorithm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createChecksum

public static String createChecksum(File file,
                                    String algorithm)
                             throws IOException,
                                    NoSuchAlgorithmException
Throws:
IOException
NoSuchAlgorithmException

verifyChecksum

public boolean verifyChecksum(File file,
                              String checksum,
                              String algorithm)
                       throws NoSuchAlgorithmException,
                              IOException
Throws:
NoSuchAlgorithmException
IOException


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.