Module hash4j

Interface FileHasher128


public interface FileHasher128
A 128-bit hash function for files and input streams.
  • Method Details

    • hashFileTo128Bits

      HashValue128 hashFileTo128Bits(File file) throws IOException
      Calculates a 128-bit hash value for the given file.
      Parameters:
      file - a file
      Returns:
      the hash value
      Throws:
      IOException - if an I/O error occurs
    • hashFileTo128Bits

      HashValue128 hashFileTo128Bits(Path path) throws IOException
      Calculates a 128-bit hash value for the given path.
      Parameters:
      path - a path
      Returns:
      the hash value
      Throws:
      IOException - if an I/O error occurs
    • hashInputStreamTo128Bits

      HashValue128 hashInputStreamTo128Bits(InputStream inputStream, long length) throws IOException
      Calculates a 128-bit hash value for a given number of bytes of the given input stream.
      Parameters:
      inputStream - the input stream
      length - the length of the input stream
      Returns:
      the hash value
      Throws:
      IOException - if an I/O error occurs