org.whitesource.agent.api
Class ChecksumUtils
java.lang.Object
org.whitesource.agent.api.ChecksumUtils
public final class ChecksumUtils
- extends Object
Utility class to calculate SHA-1 hash codes for files.
- Author:
- Edo.Shor
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
calculateSHA1
public static String calculateSHA1(File resourceFile)
throws IOException
- Calculates the given file's SHA-1 hash code.
- Parameters:
resourceFile - File to calculate
- Returns:
- Calculated SHA-1 for the given file.
- Throws:
IOException - on file reading errors.
IllegalStateException - when no algorithm for SHA-1 can be found.
Copyright © 2011-2012 White Source. All Rights Reserved.