Class DigestAlgorithm.CloseableMessageDigest

    • Method Detail

      • messageDigest

        public MessageDigest messageDigest()
        Retrieve the message digest instance.
      • digest

        public byte[] digest()
        Retrieve the message digest bytes. This will close the message digest when invoked. This is because the underlying message digest is reset on read, and we'd rather fail future interactions with the digest than act on the wrong data.
      • close

        public void close()
        Release this message digest back to the cache. Once released, you must not use the digest anymore.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface SdkAutoCloseable