Class MessageDigestHashFunction.MessageDigestHasher

    • Field Detail

      • digest

        private final java.security.MessageDigest digest
      • bytes

        private final int bytes
      • done

        private boolean done
    • Constructor Detail

      • MessageDigestHasher

        private MessageDigestHasher​(java.security.MessageDigest digest,
                                    int bytes)
    • Method Detail

      • update

        protected void update​(byte[] b,
                              int off,
                              int len)
        Description copied from class: AbstractByteHasher
        Updates this hasher with len bytes starting at off in the given buffer.
        Overrides:
        update in class AbstractByteHasher
      • update

        protected void update​(java.nio.ByteBuffer bytes)
        Description copied from class: AbstractByteHasher
        Updates this hasher with bytes from the given buffer.
        Overrides:
        update in class AbstractByteHasher
      • checkNotDone

        private void checkNotDone()
      • hash

        public HashCode hash()
        Description copied from interface: Hasher
        Computes a hash code based on the data that have been provided to this hasher. The result is unspecified if this method is called more than once on the same instance.