@Override
    public Object clone() {
        NativeRef.EVP_MD_CTX ctxCopy = new NativeRef.EVP_MD_CTX(NativeCrypto.EVP_MD_CTX_create());
        // EVP_MD_CTX_copy_ex requires that the digest struct of source EVP_MD_CTX is initialized.
        // There's no need to invoke EVP_MD_CTX_copy_ex when the digest struct isn't initialized.
        if (digestInitializedInContext) {
            NativeCrypto.EVP_MD_CTX_copy_ex(ctxCopy, ctx);
        }
        return new OpenSSLMessageDigestJDK(evp_md, size, ctxCopy, digestInitializedInContext);
    }
Creates a new OpenSSLMessageDigest instance for the given algorithm name.
common/src/main/java/org/conscrypt/OpenSSLMessageDigestJDK.java