Class SignatureDSA
- java.lang.Object
-
- org.apache.xml.security.algorithms.SignatureAlgorithmSpi
-
- org.apache.xml.security.algorithms.implementations.SignatureDSA
-
- Direct Known Subclasses:
SignatureDSA.SHA256
public class SignatureDSA extends SignatureAlgorithmSpi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SignatureDSA.SHA256
-
Constructor Summary
Constructors Constructor Description SignatureDSA()
Constructor SignatureDSA
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
engineGetJCEAlgorithmString()
Method engineGetJCEAlgorithmStringprotected String
engineGetJCEProviderName()
Method engineGetJCEProviderNameprotected String
engineGetURI()
Method engineGetURIprotected void
engineInitSign(Key privateKey)
Proxy method forSignature.initSign(java.security.PrivateKey)
which is executed on the internalSignature
object.protected void
engineInitSign(Key privateKey, SecureRandom secureRandom)
Proxy method forSignature.initSign(java.security.PrivateKey, java.security.SecureRandom)
which is executed on the internalSignature
object.protected void
engineInitSign(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec)
Method engineInitSignprotected void
engineInitVerify(Key publicKey)
Method engineInitVerifyprotected void
engineSetHMACOutputLength(int HMACOutputLength)
Method engineSetHMACOutputLengthprotected void
engineSetParameter(AlgorithmParameterSpec params)
Proxy method forSignature.setParameter( java.security.spec.AlgorithmParameterSpec)
which is executed on the internalSignature
object.protected byte[]
engineSign()
Proxy method forSignature.sign()
which is executed on the internalSignature
object.protected void
engineUpdate(byte input)
Proxy method forSignature.update(byte[])
which is executed on the internalSignature
object.protected void
engineUpdate(byte[] input)
Proxy method forSignature.update(byte[])
which is executed on the internalSignature
object.protected void
engineUpdate(byte[] buf, int offset, int len)
Proxy method forSignature.update(byte[], int, int)
which is executed on the internalSignature
object.protected boolean
engineVerify(byte[] signature)
Proxy method forSignature.verify(byte[])
which is executed on the internalSignature
object.-
Methods inherited from class org.apache.xml.security.algorithms.SignatureAlgorithmSpi
engineGetContextFromElement, reset
-
-
-
-
Field Detail
-
URI
public static final String URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SignatureDSA
public SignatureDSA() throws XMLSignatureException
Constructor SignatureDSA- Throws:
XMLSignatureException
-
-
Method Detail
-
engineGetURI
protected String engineGetURI()
Method engineGetURI- Specified by:
engineGetURI
in classSignatureAlgorithmSpi
- Returns:
- the URI representation of
Transformation algorithm
-
engineSetParameter
protected void engineSetParameter(AlgorithmParameterSpec params) throws XMLSignatureException
Description copied from class:SignatureAlgorithmSpi
Proxy method forSignature.setParameter( java.security.spec.AlgorithmParameterSpec)
which is executed on the internalSignature
object.- Specified by:
engineSetParameter
in classSignatureAlgorithmSpi
- Throws:
XMLSignatureException
-
engineVerify
protected boolean engineVerify(byte[] signature) throws XMLSignatureException
Description copied from class:SignatureAlgorithmSpi
Proxy method forSignature.verify(byte[])
which is executed on the internalSignature
object.- Specified by:
engineVerify
in classSignatureAlgorithmSpi
- Returns:
- true if the signature is correct
- Throws:
XMLSignatureException
-
engineInitVerify
protected void engineInitVerify(Key publicKey) throws XMLSignatureException
Description copied from class:SignatureAlgorithmSpi
Method engineInitVerify- Specified by:
engineInitVerify
in classSignatureAlgorithmSpi
- Throws:
XMLSignatureException
-
engineSign
protected byte[] engineSign() throws XMLSignatureException
Description copied from class:SignatureAlgorithmSpi
Proxy method forSignature.sign()
which is executed on the internalSignature
object.- Specified by:
engineSign
in classSignatureAlgorithmSpi
- Returns:
- the result of the
Signature.sign()
method - Throws:
XMLSignatureException
-
engineInitSign
protected void engineInitSign(Key privateKey, SecureRandom secureRandom) throws XMLSignatureException
Description copied from class:SignatureAlgorithmSpi
Proxy method forSignature.initSign(java.security.PrivateKey, java.security.SecureRandom)
which is executed on the internalSignature
object.- Specified by:
engineInitSign
in classSignatureAlgorithmSpi
- Throws:
XMLSignatureException
- if this method is called on a MAC
-
engineInitSign
protected void engineInitSign(Key privateKey) throws XMLSignatureException
Description copied from class:SignatureAlgorithmSpi
Proxy method forSignature.initSign(java.security.PrivateKey)
which is executed on the internalSignature
object.- Specified by:
engineInitSign
in classSignatureAlgorithmSpi
- Throws:
XMLSignatureException
- if this method is called on a MAC
-
engineUpdate
protected void engineUpdate(byte[] input) throws XMLSignatureException
Description copied from class:SignatureAlgorithmSpi
Proxy method forSignature.update(byte[])
which is executed on the internalSignature
object.- Specified by:
engineUpdate
in classSignatureAlgorithmSpi
- Throws:
XMLSignatureException
-
engineUpdate
protected void engineUpdate(byte input) throws XMLSignatureException
Description copied from class:SignatureAlgorithmSpi
Proxy method forSignature.update(byte[])
which is executed on the internalSignature
object.- Specified by:
engineUpdate
in classSignatureAlgorithmSpi
- Throws:
XMLSignatureException
-
engineUpdate
protected void engineUpdate(byte[] buf, int offset, int len) throws XMLSignatureException
Description copied from class:SignatureAlgorithmSpi
Proxy method forSignature.update(byte[], int, int)
which is executed on the internalSignature
object.- Specified by:
engineUpdate
in classSignatureAlgorithmSpi
- Throws:
XMLSignatureException
-
engineGetJCEAlgorithmString
protected String engineGetJCEAlgorithmString()
Method engineGetJCEAlgorithmString- Specified by:
engineGetJCEAlgorithmString
in classSignatureAlgorithmSpi
- Returns:
- the result of the
Signature.getAlgorithm()
method
-
engineGetJCEProviderName
protected String engineGetJCEProviderName()
Method engineGetJCEProviderName- Specified by:
engineGetJCEProviderName
in classSignatureAlgorithmSpi
- Returns:
- the JCE ProviderName
-
engineSetHMACOutputLength
protected void engineSetHMACOutputLength(int HMACOutputLength) throws XMLSignatureException
Method engineSetHMACOutputLength- Specified by:
engineSetHMACOutputLength
in classSignatureAlgorithmSpi
- Parameters:
HMACOutputLength
-- Throws:
XMLSignatureException
-
engineInitSign
protected void engineInitSign(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec) throws XMLSignatureException
Method engineInitSign- Specified by:
engineInitSign
in classSignatureAlgorithmSpi
- Parameters:
signingKey
-algorithmParameterSpec
-- Throws:
XMLSignatureException
-
-