public static Optional<HashSpi> getByAlgorithmName(String algorithmName) {
        requireNonNull(algorithmName, "algorithmName in HashProvider.getByAlgorithmName");
        ServiceLoader<HashSpi> hashSpis = load();

        return StreamSupport.stream(hashSpis.spliterator(), false)
                .filter(hashSpi -> hashSpi.getImplementedAlgorithms().contains(algorithmName))
                .findAny();
    }
Find a KDF implementation by searching the algorithms.

@param algorithmName the algorithmName to match. This is case-sensitive.
@return an instance of {@link HashProvider} if found, otherwise {@link Optional#empty()}.
@throws NullPointerException if the given parameter algorithmName is {@code null}.
crypto/hash/src/main/java/org/apache/shiro/crypto/hash/HashProvider.java