static int getDigestSizeBytesByJcaDigestAlgorithmStandardName(String algorithm)
            throws NoSuchAlgorithmException {
        String algorithmUpper = algorithm.toUpperCase(Locale.US);
        if (SHA256.JCA_NAME.equals(algorithmUpper)) {
            return EvpMdRef.SHA256.SIZE_BYTES;
        } else if (SHA512.JCA_NAME.equals(algorithmUpper)) {
            return EvpMdRef.SHA512.SIZE_BYTES;
        } else if (SHA1.JCA_NAME.equals(algorithmUpper)) {
            return EvpMdRef.SHA1.SIZE_BYTES;
        } else if (SHA384.JCA_NAME.equals(algorithmUpper)) {
            return EvpMdRef.SHA384.SIZE_BYTES;
        } else if (SHA224.JCA_NAME.equals(algorithmUpper)) {
            return EvpMdRef.SHA224.SIZE_BYTES;
        } else {
            throw new NoSuchAlgorithmException("Unsupported algorithm: " + algorithm);
        }
    }
Returns the canonical JCA digest algorithm name for the provided digest
algorithm name or {@code null} if the digest algorithm is not known.
common/src/main/java/org/conscrypt/EvpMdRef.java