Class SignatureBaseRSA
- java.lang.Object
-
- org.apache.xml.security.algorithms.SignatureAlgorithmSpi
-
- org.apache.xml.security.algorithms.implementations.SignatureBaseRSA
-
- Direct Known Subclasses:
SignatureBaseRSA.SignatureRSAMD5
,SignatureBaseRSA.SignatureRSARIPEMD160
,SignatureBaseRSA.SignatureRSASHA1
,SignatureBaseRSA.SignatureRSASHA1MGF1
,SignatureBaseRSA.SignatureRSASHA224
,SignatureBaseRSA.SignatureRSASHA224MGF1
,SignatureBaseRSA.SignatureRSASHA256
,SignatureBaseRSA.SignatureRSASHA256MGF1
,SignatureBaseRSA.SignatureRSASHA3_224MGF1
,SignatureBaseRSA.SignatureRSASHA3_256MGF1
,SignatureBaseRSA.SignatureRSASHA3_384MGF1
,SignatureBaseRSA.SignatureRSASHA3_512MGF1
,SignatureBaseRSA.SignatureRSASHA384
,SignatureBaseRSA.SignatureRSASHA384MGF1
,SignatureBaseRSA.SignatureRSASHA512
,SignatureBaseRSA.SignatureRSASHA512MGF1
public abstract class SignatureBaseRSA extends SignatureAlgorithmSpi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SignatureBaseRSA.SignatureRSAMD5
Class SignatureRSAMD5static class
SignatureBaseRSA.SignatureRSARIPEMD160
Class SignatureRSARIPEMD160static class
SignatureBaseRSA.SignatureRSASHA1
Class SignatureRSASHA1static class
SignatureBaseRSA.SignatureRSASHA1MGF1
Class SignatureRSASHA1MGF1static class
SignatureBaseRSA.SignatureRSASHA224
Class SignatureRSASHA224static class
SignatureBaseRSA.SignatureRSASHA224MGF1
Class SignatureRSASHA224MGF1static class
SignatureBaseRSA.SignatureRSASHA256
Class SignatureRSASHA256static class
SignatureBaseRSA.SignatureRSASHA256MGF1
Class SignatureRSASHA256MGF1static class
SignatureBaseRSA.SignatureRSASHA3_224MGF1
Class SignatureRSA3_SHA224MGF1static class
SignatureBaseRSA.SignatureRSASHA3_256MGF1
Class SignatureRSA3_SHA256MGF1static class
SignatureBaseRSA.SignatureRSASHA3_384MGF1
Class SignatureRSA3_SHA384MGF1static class
SignatureBaseRSA.SignatureRSASHA3_512MGF1
Class SignatureRSASHA3_512MGF1static class
SignatureBaseRSA.SignatureRSASHA384
Class SignatureRSASHA384static class
SignatureBaseRSA.SignatureRSASHA384MGF1
Class SignatureRSASHA384MGF1static class
SignatureBaseRSA.SignatureRSASHA512
Class SignatureRSASHA512static class
SignatureBaseRSA.SignatureRSASHA512MGF1
Class SignatureRSASHA512MGF1
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Logger
LOG
private java.security.Signature
signatureAlgorithm
Field algorithm
-
Constructor Summary
Constructors Constructor Description SignatureBaseRSA()
Constructor SignatureRSA
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
engineGetJCEAlgorithmString()
Proxy method forSignature.getAlgorithm()
which is executed on the internalSignature
object.protected java.lang.String
engineGetJCEProviderName()
Method engineGetJCEProviderNameabstract java.lang.String
engineGetURI()
Returns the URI representation ofTransformation algorithm
protected void
engineInitSign(java.security.Key privateKey)
Proxy method forSignature.initSign(java.security.PrivateKey)
which is executed on the internalSignature
object.protected void
engineInitSign(java.security.Key privateKey, java.security.SecureRandom secureRandom)
Proxy method forSignature.initSign(java.security.PrivateKey, java.security.SecureRandom)
which is executed on the internalSignature
object.protected void
engineInitSign(java.security.Key signingKey, java.security.spec.AlgorithmParameterSpec algorithmParameterSpec)
Proxy method forMac
which is executed on the internalMac.init(Key)
object.protected void
engineInitVerify(java.security.Key publicKey)
Method engineInitVerifyprotected void
engineSetHMACOutputLength(int HMACOutputLength)
Method engineSetHMACOutputLengthprotected void
engineSetParameter(java.security.spec.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
-
-
-
-
Constructor Detail
-
SignatureBaseRSA
public SignatureBaseRSA() throws XMLSignatureException
Constructor SignatureRSA- Throws:
XMLSignatureException
-
-
Method Detail
-
engineGetURI
public abstract java.lang.String engineGetURI()
Returns the URI representation ofTransformation algorithm
- Specified by:
engineGetURI
in classSignatureAlgorithmSpi
- Returns:
- the URI representation of
Transformation algorithm
-
engineSetParameter
protected void engineSetParameter(java.security.spec.AlgorithmParameterSpec params) throws XMLSignatureException
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
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(java.security.Key publicKey) throws XMLSignatureException
Method engineInitVerify- Specified by:
engineInitVerify
in classSignatureAlgorithmSpi
- Throws:
XMLSignatureException
-
engineSign
protected byte[] engineSign() throws XMLSignatureException
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(java.security.Key privateKey, java.security.SecureRandom secureRandom) throws XMLSignatureException
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(java.security.Key privateKey) throws XMLSignatureException
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
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
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
Proxy method forSignature.update(byte[], int, int)
which is executed on the internalSignature
object.- Specified by:
engineUpdate
in classSignatureAlgorithmSpi
- Throws:
XMLSignatureException
-
engineGetJCEAlgorithmString
protected java.lang.String engineGetJCEAlgorithmString()
Proxy method forSignature.getAlgorithm()
which is executed on the internalSignature
object.- Specified by:
engineGetJCEAlgorithmString
in classSignatureAlgorithmSpi
- Returns:
- the result of the
Signature.getAlgorithm()
method
-
engineGetJCEProviderName
protected java.lang.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
- Throws:
XMLSignatureException
-
engineInitSign
protected void engineInitSign(java.security.Key signingKey, java.security.spec.AlgorithmParameterSpec algorithmParameterSpec) throws XMLSignatureException
Proxy method forMac
which is executed on the internalMac.init(Key)
object.- Specified by:
engineInitSign
in classSignatureAlgorithmSpi
- Throws:
XMLSignatureException
- if this method is called on a Signature
-
-