org.apache.xml.security.algorithms.implementations
Class IntegrityHmac

java.lang.Object
  extended byorg.apache.xml.security.algorithms.SignatureAlgorithmSpi
      extended byorg.apache.xml.security.algorithms.implementations.IntegrityHmac
Direct Known Subclasses:
IntegrityHmac.IntegrityHmacMD5, IntegrityHmac.IntegrityHmacRIPEMD160, IntegrityHmac.IntegrityHmacSHA1, IntegrityHmac.IntegrityHmacSHA256, IntegrityHmac.IntegrityHmacSHA384, IntegrityHmac.IntegrityHmacSHA512

public abstract class IntegrityHmac
extends SignatureAlgorithmSpi

Author:
$Author: mullan $

Nested Class Summary
static class IntegrityHmac.IntegrityHmacMD5
          Class IntegrityHmacMD5
static class IntegrityHmac.IntegrityHmacRIPEMD160
          Class IntegrityHmacRIPEMD160
static class IntegrityHmac.IntegrityHmacSHA1
          Class IntegrityHmacSHA1
static class IntegrityHmac.IntegrityHmacSHA256
          Class IntegrityHmacSHA256
static class IntegrityHmac.IntegrityHmacSHA384
          Class IntegrityHmacSHA384
static class IntegrityHmac.IntegrityHmacSHA512
          Class IntegrityHmacSHA512
 
Constructor Summary
IntegrityHmac()
          Method IntegrityHmacSHA1das
 
Method Summary
 void engineAddContextToElement(org.w3c.dom.Element element)
          Method engineAddContextToElement
protected  void engineGetContextFromElement(org.w3c.dom.Element element)
          Method engineGetContextFromElement
protected  java.lang.String engineGetJCEAlgorithmString()
          Method engineGetJCEAlgorithmString
protected  java.lang.String engineGetJCEProviderName()
          Method engineGetJCEAlgorithmString
abstract  java.lang.String engineGetURI()
          Method engineGetURI
protected  void engineInitSign(java.security.Key secretKey)
          Method engineInitSign
protected  void engineInitSign(java.security.Key secretKey, java.security.spec.AlgorithmParameterSpec algorithmParameterSpec)
          Method engineInitSign
protected  void engineInitSign(java.security.Key secretKey, java.security.SecureRandom secureRandom)
          Method engineInitSign
protected  void engineInitVerify(java.security.Key secretKey)
          Proxy method for Signature.initVerify(java.security.PublicKey) which is executed on the internal Signature object.
protected  void engineSetHMACOutputLength(int HMACOutputLength)
          Method engineSetHMACOutputLength
protected  void engineSetParameter(java.security.spec.AlgorithmParameterSpec params)
          Proxy method for Signature.setParameter(java.security.spec.AlgorithmParameterSpec) which is executed on the internal Signature object.
protected  byte[] engineSign()
          Proxy method for Signature.sign() which is executed on the internal Signature object.
protected  void engineUpdate(byte input)
          Proxy method for Signature.update(byte) which is executed on the internal Signature object.
protected  void engineUpdate(byte[] input)
          Proxy method for Signature.update(byte[]) which is executed on the internal Signature object.
protected  void engineUpdate(byte[] buf, int offset, int len)
          Proxy method for Signature.update(byte[], int, int) which is executed on the internal Signature object.
protected  boolean engineVerify(byte[] signature)
          Proxy method for Signature.verify(byte[]) which is executed on the internal Signature object.
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegrityHmac

public IntegrityHmac()
              throws XMLSignatureException
Method IntegrityHmacSHA1das

Throws:
XMLSignatureException
Method Detail

engineGetURI

public abstract java.lang.String engineGetURI()
Method engineGetURI

Specified by:
engineGetURI in class SignatureAlgorithmSpi
Returns:
the URI representation of Transformation algorithm

engineSetParameter

protected void engineSetParameter(java.security.spec.AlgorithmParameterSpec params)
                           throws XMLSignatureException
Proxy method for Signature.setParameter(java.security.spec.AlgorithmParameterSpec) which is executed on the internal Signature object.

Specified by:
engineSetParameter in class SignatureAlgorithmSpi
Parameters:
params -
Throws:
XMLSignatureException

reset

public void reset()
Overrides:
reset in class SignatureAlgorithmSpi

engineVerify

protected boolean engineVerify(byte[] signature)
                        throws XMLSignatureException
Proxy method for Signature.verify(byte[]) which is executed on the internal Signature object.

Specified by:
engineVerify in class SignatureAlgorithmSpi
Parameters:
signature -
Returns:
true if the signature is correct
Throws:
XMLSignatureException

engineInitVerify

protected void engineInitVerify(java.security.Key secretKey)
                         throws XMLSignatureException
Proxy method for Signature.initVerify(java.security.PublicKey) which is executed on the internal Signature object.

Specified by:
engineInitVerify in class SignatureAlgorithmSpi
Parameters:
secretKey -
Throws:
XMLSignatureException

engineSign

protected byte[] engineSign()
                     throws XMLSignatureException
Proxy method for Signature.sign() which is executed on the internal Signature object.

Specified by:
engineSign in class SignatureAlgorithmSpi
Returns:
the result of the Signature.sign() method
Throws:
XMLSignatureException

engineInitSign

protected void engineInitSign(java.security.Key secretKey)
                       throws XMLSignatureException
Method engineInitSign

Specified by:
engineInitSign in class SignatureAlgorithmSpi
Parameters:
secretKey -
Throws:
XMLSignatureException

engineInitSign

protected void engineInitSign(java.security.Key secretKey,
                              java.security.spec.AlgorithmParameterSpec algorithmParameterSpec)
                       throws XMLSignatureException
Method engineInitSign

Specified by:
engineInitSign in class SignatureAlgorithmSpi
Parameters:
secretKey -
algorithmParameterSpec -
Throws:
XMLSignatureException

engineInitSign

protected void engineInitSign(java.security.Key secretKey,
                              java.security.SecureRandom secureRandom)
                       throws XMLSignatureException
Method engineInitSign

Specified by:
engineInitSign in class SignatureAlgorithmSpi
Parameters:
secretKey -
secureRandom -
Throws:
XMLSignatureException

engineUpdate

protected void engineUpdate(byte[] input)
                     throws XMLSignatureException
Proxy method for Signature.update(byte[]) which is executed on the internal Signature object.

Specified by:
engineUpdate in class SignatureAlgorithmSpi
Parameters:
input -
Throws:
XMLSignatureException

engineUpdate

protected void engineUpdate(byte input)
                     throws XMLSignatureException
Proxy method for Signature.update(byte) which is executed on the internal Signature object.

Specified by:
engineUpdate in class SignatureAlgorithmSpi
Parameters:
input -
Throws:
XMLSignatureException

engineUpdate

protected void engineUpdate(byte[] buf,
                            int offset,
                            int len)
                     throws XMLSignatureException
Proxy method for Signature.update(byte[], int, int) which is executed on the internal Signature object.

Specified by:
engineUpdate in class SignatureAlgorithmSpi
Parameters:
buf -
offset -
len -
Throws:
XMLSignatureException

engineGetJCEAlgorithmString

protected java.lang.String engineGetJCEAlgorithmString()
Method engineGetJCEAlgorithmString

Specified by:
engineGetJCEAlgorithmString in class SignatureAlgorithmSpi
Returns:
the result of the Signature.getAlgorithm() method

engineGetJCEProviderName

protected java.lang.String engineGetJCEProviderName()
Method engineGetJCEAlgorithmString

Specified by:
engineGetJCEProviderName in class SignatureAlgorithmSpi
Returns:
the JCE ProviderName

engineSetHMACOutputLength

protected void engineSetHMACOutputLength(int HMACOutputLength)
Method engineSetHMACOutputLength

Specified by:
engineSetHMACOutputLength in class SignatureAlgorithmSpi
Parameters:
HMACOutputLength -

engineGetContextFromElement

protected void engineGetContextFromElement(org.w3c.dom.Element element)
Method engineGetContextFromElement

Overrides:
engineGetContextFromElement in class SignatureAlgorithmSpi
Parameters:
element -

engineAddContextToElement

public void engineAddContextToElement(org.w3c.dom.Element element)
Method engineAddContextToElement

Parameters:
element -