de.flexiprovider.core.md
Class VSH

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

public class VSH
extends MessageDigest

This is an implementation of the Basic VSH Message digest

Author:
Paul Nguentcheu

Inner Class Summary
protected static class VSH.Bitstring
          Inner class for representing bit strings.
 
Field Summary
static java.lang.String ALG_NAME
          The algorithm name.
 
Constructor Summary
VSH()
          Constructor.
 
Method Summary
 byte[] digest()
          Completes the hash computation by performing final operations such as padding.
 int getDigestLength()
           
 void reset()
          Resets the digest for further use.
 void update(byte input)
          Updates the digest using the specified byte.
 void update(byte[] input, int offset, int len)
          Updates 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

VSH

public VSH()
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 offset,
                   int len)
Updates the digest using the specified array of bytes, starting at the specified offset.
Overrides:
update in class MessageDigest
Parameters:
input - the byte[] to use for the update.
offset - the offset to start from in the array of bytes.
len - the number of bytes to use, starting at offset.

update

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

reset

public void reset()
Resets the digest for further use.
Overrides:
reset in class MessageDigest

digest

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