org.jboss.crypto.digest
Class SHAInterleave

java.lang.Object
  extended by java.security.MessageDigestSpi
      extended by org.jboss.crypto.digest.SHAInterleave

public class SHAInterleave
extends MessageDigestSpi

The SHA_Interleave algorithm as described in section 3.1 of RFC2945. This needs an SHA MessageDigest provider to function.

Version:
$Revision: 57203 $
Author:
Scott.Stark@jboss.org

Constructor Summary
SHAInterleave()
          Creates a new instance of SHAInterleave
 
Method Summary
protected  byte[] engineDigest()
          Completes the digest computation by performing final operations such as padding.
protected  int engineGetDigestLength()
           
protected  void engineReset()
          Resets the digest for further use.
protected  void engineUpdate(byte input)
          Updates the digest using the specified byte.
protected  void engineUpdate(byte[] input, int offset, int len)
          Updates the digest using the specified array of bytes, starting at the specified offset.
 
Methods inherited from class java.security.MessageDigestSpi
clone, engineDigest, engineUpdate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SHAInterleave

public SHAInterleave()
Creates a new instance of SHAInterleave

Throws:
ProviderException - thrown if MessageDigest.getInstance("SHA") throws a NoSuchAlgorithmException.
Method Detail

engineGetDigestLength

protected int engineGetDigestLength()
Overrides:
engineGetDigestLength in class MessageDigestSpi

engineDigest

protected byte[] engineDigest()
Completes the digest computation by performing final operations such as padding. Once engineDigest has been called, the engine should be reset (see engineReset). Resetting is the responsibility of the engine implementor.

Specified by:
engineDigest in class MessageDigestSpi
Returns:
the array of bytes for the resulting digest value.

engineReset

protected void engineReset()
Resets the digest for further use.

Specified by:
engineReset in class MessageDigestSpi

engineUpdate

protected void engineUpdate(byte input)
Updates the digest using the specified byte.

Specified by:
engineUpdate in class MessageDigestSpi
Parameters:
input - the byte to use for the update.

engineUpdate

protected void engineUpdate(byte[] input,
                            int offset,
                            int len)
Updates the digest using the specified array of bytes, starting at the specified offset.

Specified by:
engineUpdate in class MessageDigestSpi
Parameters:
input - the array of bytes to use for the update.
offset - the offset to start from in the array of bytes.
len - the input of bytes to use, starting at offset.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.