org.apache.xml.security.algorithms
Class SignatureAlgorithmSpi

java.lang.Object
  extended by org.apache.xml.security.algorithms.SignatureAlgorithmSpi
Direct Known Subclasses:
IntegrityHmac, SignatureBaseRSA, SignatureDSA, SignatureECDSA

public abstract class SignatureAlgorithmSpi
extends Object


Constructor Summary
SignatureAlgorithmSpi()
           
 
Method Summary
protected  void engineGetContextFromElement(Element element)
          Method engineGetContextFromElement
protected abstract  String engineGetJCEAlgorithmString()
          Proxy method for Signature.getAlgorithm() which is executed on the internal Signature object.
protected abstract  String engineGetJCEProviderName()
          Method engineGetJCEProviderName
protected abstract  String engineGetURI()
          Returns the URI representation of Transformation algorithm
protected abstract  void engineInitSign(Key signingKey)
          Proxy method for Signature.initSign(java.security.PrivateKey) which is executed on the internal Signature object.
protected abstract  void engineInitSign(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec)
          Proxy method for Mac which is executed on the internal Mac.init(Key) object.
protected abstract  void engineInitSign(Key signingKey, SecureRandom secureRandom)
          Proxy method for Signature.initSign(java.security.PrivateKey, java.security.SecureRandom) which is executed on the internal Signature object.
protected abstract  void engineInitVerify(Key verificationKey)
          Method engineInitVerify
protected abstract  void engineSetHMACOutputLength(int HMACOutputLength)
          Method engineSetHMACOutputLength
protected abstract  void engineSetParameter(AlgorithmParameterSpec params)
          Proxy method for Signature.setParameter( java.security.spec.AlgorithmParameterSpec) which is executed on the internal Signature object.
protected abstract  byte[] engineSign()
          Proxy method for Signature.sign() which is executed on the internal Signature object.
protected abstract  void engineUpdate(byte input)
          Proxy method for Signature.update(byte[]) which is executed on the internal Signature object.
protected abstract  void engineUpdate(byte[] input)
          Proxy method for Signature.update(byte[]) which is executed on the internal Signature object.
protected abstract  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 abstract  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

SignatureAlgorithmSpi

public SignatureAlgorithmSpi()
Method Detail

engineGetURI

protected abstract String engineGetURI()
Returns the URI representation of Transformation algorithm

Returns:
the URI representation of Transformation algorithm

engineGetJCEAlgorithmString

protected abstract String engineGetJCEAlgorithmString()
Proxy method for Signature.getAlgorithm() which is executed on the internal Signature object.

Returns:
the result of the Signature.getAlgorithm() method

engineGetJCEProviderName

protected abstract String engineGetJCEProviderName()
Method engineGetJCEProviderName

Returns:
the JCE ProviderName

engineUpdate

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

Parameters:
input -
Throws:
XMLSignatureException

engineUpdate

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

Parameters:
input -
Throws:
XMLSignatureException

engineUpdate

protected abstract 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.

Parameters:
buf -
offset -
len -
Throws:
XMLSignatureException

engineInitSign

protected abstract void engineInitSign(Key signingKey)
                                throws XMLSignatureException
Proxy method for Signature.initSign(java.security.PrivateKey) which is executed on the internal Signature object.

Parameters:
signingKey -
Throws:
XMLSignatureException - if this method is called on a MAC

engineInitSign

protected abstract void engineInitSign(Key signingKey,
                                       SecureRandom secureRandom)
                                throws XMLSignatureException
Proxy method for Signature.initSign(java.security.PrivateKey, java.security.SecureRandom) which is executed on the internal Signature object.

Parameters:
signingKey -
secureRandom -
Throws:
XMLSignatureException - if this method is called on a MAC

engineInitSign

protected abstract void engineInitSign(Key signingKey,
                                       AlgorithmParameterSpec algorithmParameterSpec)
                                throws XMLSignatureException
Proxy method for Mac which is executed on the internal Mac.init(Key) object.

Parameters:
signingKey -
algorithmParameterSpec -
Throws:
XMLSignatureException - if this method is called on a Signature

engineSign

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

Returns:
the result of the Signature.sign() method
Throws:
XMLSignatureException

engineInitVerify

protected abstract void engineInitVerify(Key verificationKey)
                                  throws XMLSignatureException
Method engineInitVerify

Parameters:
verificationKey -
Throws:
XMLSignatureException

engineVerify

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

Parameters:
signature -
Returns:
true if the signature is correct
Throws:
XMLSignatureException

engineSetParameter

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

Parameters:
params -
Throws:
XMLSignatureException

engineGetContextFromElement

protected void engineGetContextFromElement(Element element)
Method engineGetContextFromElement

Parameters:
element -

engineSetHMACOutputLength

protected abstract void engineSetHMACOutputLength(int HMACOutputLength)
                                           throws XMLSignatureException
Method engineSetHMACOutputLength

Parameters:
HMACOutputLength -
Throws:
XMLSignatureException

reset

public void reset()


Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.