Klasse MD5Util

java.lang.Object
de.dlr.proseo.basewrap.MD5Util

public class MD5Util extends Object
Utility methods to efficiently calculate an MD5 hash string from a file
Autor:
Dr. Thomas Bassler
  • Konstruktordetails

    • MD5Util

      public MD5Util()
  • Methodendetails

    • bytesToHex

      public static String bytesToHex(byte[] bytes)
      Generate a string of hex digits (upper-case) representing the given byte array
      Parameter:
      bytes - the byte array to convert
      Gibt zurück:
      a string with (upper-case) hex digits
    • md5Digest

      public static String md5Digest(File inputFile) throws IOException
      Create an (upper-case) MD5 hash string for the given file
      Parameter:
      inputFile - the file to digest
      Gibt zurück:
      an MD5 hash string
      Löst aus:
      IOException - if the given file cannot be read