protected MessageDigest getDigest(String algorithmName) throws UnknownAlgorithmException {
        try {
            return MessageDigest.getInstance(algorithmName);
        } catch (NoSuchAlgorithmException e) {
            String msg = "No native '" + algorithmName + "' MessageDigest instance available on the current JVM.";
            throw new UnknownAlgorithmException(msg, e);
        }
    }
Returns the JDK MessageDigest instance to use for executing the hash.

@param algorithmName the algorithm to use for the hash, provided by subclasses.
@return the MessageDigest object for the specified {@code algorithm}.
@throws UnknownAlgorithmException if the specified algorithm name is not available.
crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHash.java