Class SignatureAlgorithmSpi
java.lang.Object
org.apache.xml.security.algorithms.SignatureAlgorithmSpi
- Direct Known Subclasses:
IntegrityHmac
,SignatureBaseRSA
,SignatureDSA
,SignatureECDSA
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
engineGetContextFromElement
(Element element) Method engineGetContextFromElementprotected abstract String
Proxy method forSignature.getAlgorithm()
which is executed on the internalSignature
object.protected abstract String
Method engineGetJCEProviderNameprotected abstract String
Returns the URI representation ofTransformation algorithm
protected abstract void
engineInitSign
(Key signingKey) Proxy method forSignature.initSign(java.security.PrivateKey)
which is executed on the internalSignature
object.protected abstract void
engineInitSign
(Key signingKey, SecureRandom secureRandom) Proxy method forSignature.initSign(java.security.PrivateKey, java.security.SecureRandom)
which is executed on the internalSignature
object.protected abstract void
engineInitSign
(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec) Proxy method forMac
which is executed on the internalMac.init(Key)
object.protected abstract void
engineInitVerify
(Key verificationKey) Method engineInitVerifyprotected abstract void
engineSetHMACOutputLength
(int HMACOutputLength) Method engineSetHMACOutputLengthprotected abstract void
Proxy method forSignature.setParameter(java.security.spec.AlgorithmParameterSpec)
which is executed on the internalSignature
object.protected abstract byte[]
Proxy method forSignature.sign()
which is executed on the internalSignature
object.protected abstract void
engineUpdate
(byte input) Proxy method forSignature.update(byte[])
which is executed on the internalSignature
object.protected abstract void
engineUpdate
(byte[] input) Proxy method forSignature.update(byte[])
which is executed on the internalSignature
object.protected abstract void
engineUpdate
(byte[] buf, int offset, int len) Proxy method forSignature.update(byte[], int, int)
which is executed on the internalSignature
object.protected abstract boolean
engineVerify
(byte[] signature) Proxy method forSignature.verify(byte[])
which is executed on the internalSignature
object.void
reset()
-
Constructor Details
-
SignatureAlgorithmSpi
public SignatureAlgorithmSpi()
-
-
Method Details
-
engineGetURI
Returns the URI representation ofTransformation algorithm
- Returns:
- the URI representation of
Transformation algorithm
-
engineGetJCEAlgorithmString
Proxy method forSignature.getAlgorithm()
which is executed on the internalSignature
object.- Returns:
- the result of the
Signature.getAlgorithm()
method
-
engineGetJCEProviderName
Method engineGetJCEProviderName- Returns:
- the JCE ProviderName
-
engineUpdate
Proxy method forSignature.update(byte[])
which is executed on the internalSignature
object.- Parameters:
input
-- Throws:
XMLSignatureException
-
engineUpdate
Proxy method forSignature.update(byte[])
which is executed on the internalSignature
object.- Parameters:
input
-- Throws:
XMLSignatureException
-
engineUpdate
Proxy method forSignature.update(byte[], int, int)
which is executed on the internalSignature
object.- Parameters:
buf
-offset
-len
-- Throws:
XMLSignatureException
-
engineInitSign
Proxy method forSignature.initSign(java.security.PrivateKey)
which is executed on the internalSignature
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 forSignature.initSign(java.security.PrivateKey, java.security.SecureRandom)
which is executed on the internalSignature
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 forMac
which is executed on the internalMac.init(Key)
object.- Parameters:
signingKey
-algorithmParameterSpec
-- Throws:
XMLSignatureException
- if this method is called on a Signature
-
engineSign
Proxy method forSignature.sign()
which is executed on the internalSignature
object.- Returns:
- the result of the
Signature.sign()
method - Throws:
XMLSignatureException
-
engineInitVerify
Method engineInitVerify- Parameters:
verificationKey
-- Throws:
XMLSignatureException
-
engineVerify
Proxy method forSignature.verify(byte[])
which is executed on the internalSignature
object.- Parameters:
signature
-- Returns:
- true if the signature is correct
- Throws:
XMLSignatureException
-
engineSetParameter
protected abstract void engineSetParameter(AlgorithmParameterSpec params) throws XMLSignatureException Proxy method forSignature.setParameter(java.security.spec.AlgorithmParameterSpec)
which is executed on the internalSignature
object.- Parameters:
params
-- Throws:
XMLSignatureException
-
engineGetContextFromElement
Method engineGetContextFromElement- Parameters:
element
-
-
engineSetHMACOutputLength
protected abstract void engineSetHMACOutputLength(int HMACOutputLength) throws XMLSignatureException Method engineSetHMACOutputLength- Parameters:
HMACOutputLength
-- Throws:
XMLSignatureException
-
reset
public void reset()
-