Package de.dlr.proseo.basewrap
Class MD5Util
java.lang.Object
de.dlr.proseo.basewrap.MD5Util
Utility methods to efficiently calculate an MD5 hash string from a file
- Author:
- Dr. Thomas Bassler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbytesToHex(byte[] bytes) Generate a string of hex digits (upper-case) representing the given byte arraystatic StringCreate an (upper-case) MD5 hash string for the given file
-
Constructor Details
-
MD5Util
public MD5Util()
-
-
Method Details
-
bytesToHex
Generate a string of hex digits (upper-case) representing the given byte array- Parameters:
bytes- the byte array to convert- Returns:
- a string with (upper-case) hex digits
-
md5Digest
Create an (upper-case) MD5 hash string for the given file- Parameters:
inputFile- the file to digest- Returns:
- an MD5 hash string
- Throws:
IOException- if the given file cannot be read
-