org.apache.maven.shared.repository.utils
Class DigestUtils
java.lang.Object
org.apache.maven.shared.repository.utils.DigestUtils
public final class DigestUtils
- extends java.lang.Object
Create a digest for a file. Stolen from repository-utils - once released, use that instead.
- Author:
- Brett Porter
Method Summary |
static java.lang.String |
createChecksum(java.io.File file,
java.lang.String algorithm)
|
boolean |
verifyChecksum(java.io.File file,
java.lang.String checksum,
java.lang.String algorithm)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createChecksum
public static java.lang.String createChecksum(java.io.File file,
java.lang.String algorithm)
throws java.io.IOException,
java.security.NoSuchAlgorithmException
- Throws:
java.io.IOException
java.security.NoSuchAlgorithmException
verifyChecksum
public boolean verifyChecksum(java.io.File file,
java.lang.String checksum,
java.lang.String algorithm)
throws java.security.NoSuchAlgorithmException,
java.io.IOException
- Throws:
java.security.NoSuchAlgorithmException
java.io.IOException
Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.