de.flexiprovider.core.md
Class DHA256

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

public class DHA256
extends MessageDigest

This is an implementaion of the DHA-256 Message digest DHA-256 is a 256-bit hash and is meant to provide 128 bits of security against collision attacks.

Author:
Paul Nguentcheu

Field Summary
static java.lang.String ALG_NAME
          The algorithm name.
 
Constructor Summary
DHA256()
          Default constructor
 
Method Summary
 byte[] digest()
          Complete the hash computation by performing final operations such as padding.
 int getDigestLength()
           
 void reset()
          Reset the digest objects to its initial state.
 void update(byte input)
          Update the digest using the specified byte.
 void update(byte[] input, int inOff, int inLen)
          Update the digest using the specified array of bytes, starting at the specified offset.
 
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
 

Field Detail

ALG_NAME

public static final java.lang.String ALG_NAME
The algorithm name.
Constructor Detail

DHA256

public DHA256()
Default constructor
Method Detail

getDigestLength

public int getDigestLength()
Overrides:
getDigestLength in class MessageDigest
Returns:
the digest length in bytes

update

public void update(byte[] input,
                   int inOff,
                   int inLen)
Update the digest using the specified array of bytes, starting at the specified offset.
Overrides:
update in class MessageDigest
Parameters:
input - the byte array to use for the update
inOff - the offset to start from in the byte array
inLen - the number of bytes to use

update

public void update(byte input)
Update the digest using the specified byte.
Overrides:
update in class MessageDigest
Parameters:
input - the byte to use for the update

digest

public byte[] digest()
Complete the hash computation by performing final operations such as padding.
Overrides:
digest in class MessageDigest
Returns:
the digest value

reset

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