de.flexiprovider.core.md
Class NullDigest

java.lang.Object
  |
  +--java.security.MessageDigestSpi
        |
        +--de.flexiprovider.api.MessageDigest
              |
              +--de.flexiprovider.core.md.NullDigest

public final class NullDigest
extends MessageDigest

This class only performs buffering of the input data. No message digest function is applied.

Author:
Ralf-Philipp Weinmann, Martin Döring

Constructor Summary
NullDigest()
           
 
Method Summary
 byte[] digest()
          Complete the hash computation by performing final operations such as padding.
 int getDigestLength()
          Get length of message digest.
 void reset()
          Reset message digest to its initial state.
 void update(byte b)
          Process the given byte.
 void update(byte[] input, int inOff, int inLen)
          Processes the given number of bytes, supplied in a byte array starting at the given position.
 
Methods inherited from class de.flexiprovider.api.MessageDigest
digest, digest, engineDigest, engineGetDigestLength, engineReset, engineUpdate, engineUpdate, update
 
Methods inherited from class java.security.MessageDigestSpi
clone, engineDigest
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullDigest

public NullDigest()
Method Detail

getDigestLength

public int getDigestLength()
Get length of message digest. This equals the amount of data accumulated thus far and thus is NOT a fixed value.
Overrides:
getDigestLength in class MessageDigest
Returns:
the length of the message digest

update

public void update(byte b)
Process the given byte.
Overrides:
update in class MessageDigest
Parameters:
b - the byte to be processed

update

public void update(byte[] input,
                   int inOff,
                   int inLen)
Processes the given number of bytes, supplied in a byte array starting at the given position.
Overrides:
update in class MessageDigest
Parameters:
input - the byte array containing the input
inOff - the offset where the input starts
inLen - the length of the input

digest

public byte[] digest()
Description copied from class: MessageDigest
Complete the hash computation by performing final operations such as padding. Once MessageDigest.digest() has been called, the engine should be reset (see MessageDigest.reset()). Resetting is the responsibility of the engine implementor.
Overrides:
digest in class MessageDigest
Returns:
the computed digest value

reset

public void reset()
Reset message digest to its initial state.
Overrides:
reset in class MessageDigest