Module de.carne
Package de.carne.io

Class MessageDigestChecksum

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected MessageDigestChecksum​(java.security.MessageDigest digest)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getValue()
      Finalizes the checksum generation, returns the result and resets the generator.
      void reset()
      Resets the generator to it's start state.
      void update​(byte b)
      Feeds a single byte into the generator.
      void update​(byte[] bs)
      Feeds a byte array into the generator.
      void update​(byte[] bs, int off, int len)
      Feeds a byte array into the generator.
      void update​(java.nio.ByteBuffer bs)
      Feeds a ByteBuffer into the generator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MessageDigestChecksum

        protected MessageDigestChecksum​(java.security.MessageDigest digest)
    • Method Detail

      • reset

        public void reset()
        Description copied from interface: Checksum
        Resets the generator to it's start state.
        Specified by:
        reset in interface Checksum
      • update

        public void update​(byte b)
        Description copied from interface: Checksum
        Feeds a single byte into the generator.
        Specified by:
        update in interface Checksum
        Parameters:
        b - the byte to feed.
      • update

        public void update​(byte[] bs)
        Description copied from interface: Checksum
        Feeds a byte array into the generator.
        Specified by:
        update in interface Checksum
        Parameters:
        bs - the byte array to feed.
      • update

        public void update​(byte[] bs,
                           int off,
                           int len)
        Description copied from interface: Checksum
        Feeds a byte array into the generator.
        Specified by:
        update in interface Checksum
        Parameters:
        bs - the byte array to feed.
        off - the first byte to feed.
        len - the number of bytes to feed.
      • update

        public void update​(java.nio.ByteBuffer bs)
        Description copied from interface: Checksum
        Feeds a ByteBuffer into the generator.
        Specified by:
        update in interface Checksum
        Parameters:
        bs - the ByteBuffer to feed.
      • getValue

        public byte[] getValue()
        Description copied from interface: Checksum
        Finalizes the checksum generation, returns the result and resets the generator.
        Specified by:
        getValue in interface Checksum
        Returns:
        the generated checksum.