Interface FileHash

All Known Implementing Classes:
BigFileHashHandler, FileHashHandler

public interface FileHash
The FileHash interface provides methods to compute various cryptographic hash values (SHA-256, SHA-3, and BLAKE_2B) for a given file. It serves as an abstraction layer for different hashing algorithms that can be used to verify file integrity or uniqueness.
  • Method Details

    • GetAllHashes

      HashForFilesOutput GetAllHashes(File file)
      Calculates hashes of three different algorithms (SHA2,SHA3, BLAKE_2B) of a file
      Parameters:
      file - to extract hash from
      Returns:
      A wrapper object containing the file and the three resulting hash strings.
    • calculateSha256Hash

      String calculateSha256Hash(File file)
      Calculates the SHA256 Hash of a file
      Parameters:
      file - to extract hash from
      Returns:
      A string containing the hexadecimal representation of the bytes in SHA2 Hash
    • calculateSha3Hash

      String calculateSha3Hash(File file)
      Calculates the SHA3 Hash of a file
      Parameters:
      file - to extract hash from
      Returns:
      A string containing the hexadecimal representation of the bytes in SHA3 Hash
    • calculateBlake2bHash

      String calculateBlake2bHash(File file)
      Calculates the Blake2B Hash of a file
      Parameters:
      file - to extract hash from
      Returns:
      A string containing the hexadecimal representation of the bytes in a Blake2B Hash