Class MacHashFunction.MacHasher

All Implemented Interfaces:
Hasher, PrimitiveSink
Enclosing class:
MacHashFunction

private static final class MacHashFunction.MacHasher extends AbstractByteHasher
Hasher that updates a Mac (message authentication code).
  • Field Details

    • mac

      private final Mac mac
    • done

      private boolean done
  • Constructor Details

    • MacHasher

      private MacHasher(Mac mac)
  • Method Details

    • update

      protected void update(byte b)
      Description copied from class: AbstractByteHasher
      Updates this hasher with the given byte.
      Specified by:
      update in class AbstractByteHasher
    • update

      protected void update(byte[] b)
      Description copied from class: AbstractByteHasher
      Updates this hasher with the given bytes.
      Overrides:
      update in class AbstractByteHasher
    • 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(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.