Class HashProvider

java.lang.Object
org.apache.shiro.crypto.hash.HashProvider

public final class HashProvider extends Object
Hashes used by the Shiro2CryptFormat class.

Instead of maintaining them as an Enum, ServiceLoaders would provide a pluggable alternative.

Since:
2.0
  • Method Details

    • getByAlgorithmName

      public static Optional<HashSpi> getByAlgorithmName(String algorithmName)
      Find a KDF implementation by searching the algorithms.
      Parameters:
      algorithmName - the algorithmName to match. This is case-sensitive.
      Returns:
      an instance of HashProvider if found, otherwise Optional.empty().
      Throws:
      NullPointerException - if the given parameter algorithmName is null.