Class Hash

java.lang.Object
com.pnfsoftware.jeb.util.encoding.Hash

public class Hash extends Object
Hash calculation routines. To calculate multiple hashes in a more efficient way, use HashCalculator instead.
  • Constructor Details

    • Hash

      public Hash()
  • Method Details

    • calculateCRC32

      public static int calculateCRC32(byte[] data)
    • calculateMD5

      public static byte[] calculateMD5(byte[] data)
    • calculateSHA1

      public static byte[] calculateSHA1(byte[] data)
    • calculateSHA256

      public static byte[] calculateSHA256(byte[] data)
    • checksumBlockFileUpdate

      public static void checksumBlockFileUpdate(Checksum h, File f) throws IOException
      Throws:
      IOException
    • checksumBlockFileUpdate

      public static void checksumBlockFileUpdate(Checksum h, File f, long offset, long size) throws IOException
      Throws:
      IOException
    • checksumBlockFileUpdate

      public static void checksumBlockFileUpdate(Checksum h, RandomAccessFile raf, long size) throws IOException
      Throws:
      IOException