Class HashElement

    • Constructor Detail

      • HashElement

        public HashElement​(HashManager.ALGORITHM algorithm,
                           byte[] hash)
        Create a HashElement from pre-calculated values.
        Parameters:
        algorithm - The algorithm which was used.
        hash - the checksum as byte array.
      • HashElement

        public HashElement​(HashManager.ALGORITHM algorithm,
                           java.lang.String hashB64)
        Create a HashElement from pre-calculated values.
        Parameters:
        algorithm - the algorithm that was used.
        hashB64 - the checksum in base 64.
    • Method Detail

      • getHash

        public byte[] getHash()
        Return the checksum as a byte array.
        Returns:
        the hash.
      • getHashB64

        public java.lang.String getHashB64()
        Return the checksum as a base16 (hex) string.
        Returns:
        the hash.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object