Class Policy.HashAlgorithmPolicy

    • Method Detail

      • defaultHashAlgorithm

        public HashAlgorithm defaultHashAlgorithm()
        Return the default hash algorithm. This algorithm is used as a fallback when no consensus about hash algorithms can be reached.
        Returns:
        default hash algorithm
      • isAcceptable

        public boolean isAcceptable​(HashAlgorithm hashAlgorithm)
        Return true if the the given hash algorithm is acceptable by this policy.
        Parameters:
        hashAlgorithm - hash algorithm
        Returns:
        true if the hash algorithm is acceptable, false otherwise
      • isAcceptable

        public boolean isAcceptable​(int algorithmId)
        Return true if the the given hash algorithm is acceptable by this policy.
        Parameters:
        algorithmId - hash algorithm
        Returns:
        true if the hash algorithm is acceptable, false otherwise