Class MessageDigestInputStream.Builder

    • Method Detail

      • setMessageDigest

        public MessageDigestInputStream.Builder setMessageDigest​(java.security.MessageDigest messageDigest)
        Sets the message digest.

        The MD5 cryptographic algorithm is weak and should not be used.

        Parameters:
        messageDigest - the message digest.
        Returns:
        this
      • setMessageDigest

        public MessageDigestInputStream.Builder setMessageDigest​(java.lang.String algorithm)
                                                          throws java.security.NoSuchAlgorithmException
        Sets the name of the name of the message digest algorithm.

        The MD5 cryptographic algorithm is weak and should not be used.

        Parameters:
        algorithm - the name of the algorithm. See the MessageDigest section in the Java Cryptography Architecture Standard Algorithm Name Documentation for information about standard algorithm names.
        Returns:
        this
        Throws:
        java.security.NoSuchAlgorithmException - if no Provider supports a MessageDigestSpi implementation for the specified algorithm.