Class SignatureECDSA
java.lang.Object
org.apache.xml.security.algorithms.SignatureAlgorithmSpi
org.apache.xml.security.algorithms.implementations.SignatureECDSA
- Direct Known Subclasses:
SignatureECDSA.SignatureECDSARIPEMD160,SignatureECDSA.SignatureECDSASHA1,SignatureECDSA.SignatureECDSASHA224,SignatureECDSA.SignatureECDSASHA256,SignatureECDSA.SignatureECDSASHA384,SignatureECDSA.SignatureECDSASHA512
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass SignatureECDSARIPEMD160static classClass SignatureECDSASHA1static classClass SignatureECDSASHA224static classClass SignatureECDSASHA256static classClass SignatureECDSASHA384static classClass SignatureECDSASHA512 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]convertASN1toXMLDSIG(byte[] asn1Bytes) Converts an ASN.1 ECDSA value to a XML Signature ECDSA Value.static byte[]convertXMLDSIGtoASN1(byte[] xmldsigBytes) Converts a XML Signature ECDSA Value to an ASN.1 DSA value.protected StringProxy method forSignature.getAlgorithm()which is executed on the internalSignatureobject.protected StringMethod engineGetJCEProviderNameabstract StringReturns the URI representation ofTransformation algorithmprotected voidengineInitSign(Key privateKey) Proxy method forSignature.initSign(java.security.PrivateKey)which is executed on the internalSignatureobject.protected voidengineInitSign(Key privateKey, SecureRandom secureRandom) Proxy method forSignature.initSign(java.security.PrivateKey, java.security.SecureRandom)which is executed on the internalSignatureobject.protected voidengineInitSign(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec) Proxy method forMacwhich is executed on the internalMac.init(Key)object.protected voidengineInitVerify(Key publicKey) Method engineInitVerifyprotected voidengineSetHMACOutputLength(int HMACOutputLength) Method engineSetHMACOutputLengthprotected voidProxy method forSignature.setParameter(java.security.spec.AlgorithmParameterSpec)which is executed on the internalSignatureobject.protected byte[]Proxy method forSignature.sign()which is executed on the internalSignatureobject.protected voidengineUpdate(byte input) Proxy method forSignature.update(byte[])which is executed on the internalSignatureobject.protected voidengineUpdate(byte[] input) Proxy method forSignature.update(byte[])which is executed on the internalSignatureobject.protected voidengineUpdate(byte[] buf, int offset, int len) Proxy method forSignature.update(byte[], int, int)which is executed on the internalSignatureobject.protected booleanengineVerify(byte[] signature) Proxy method forSignature.verify(byte[])which is executed on the internalSignatureobject.Methods inherited from class org.apache.xml.security.algorithms.SignatureAlgorithmSpi
engineGetContextFromElement, reset
-
Constructor Details
-
SignatureECDSA
Constructor SignatureRSA- Throws:
XMLSignatureException
-
-
Method Details
-
engineGetURI
Returns the URI representation ofTransformation algorithm- Specified by:
engineGetURIin classSignatureAlgorithmSpi- Returns:
- the URI representation of
Transformation algorithm
-
convertASN1toXMLDSIG
Converts an ASN.1 ECDSA value to a XML Signature ECDSA Value. The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r, s) value pairs; the XML Signature requires the core BigInteger values.- Parameters:
asn1Bytes-- Returns:
- the decode bytes
- Throws:
IOException- See Also:
-
convertXMLDSIGtoASN1
Converts a XML Signature ECDSA Value to an ASN.1 DSA value. The JAVA JCE ECDSA Signature algorithm creates ASN.1 encoded (r, s) value pairs; the XML Signature requires the core BigInteger values.- Parameters:
xmldsigBytes-- Returns:
- the encoded ASN.1 bytes
- Throws:
IOException- See Also:
-
engineSetParameter
Proxy method forSignature.setParameter(java.security.spec.AlgorithmParameterSpec)which is executed on the internalSignatureobject.- Specified by:
engineSetParameterin classSignatureAlgorithmSpi- Throws:
XMLSignatureException
-
engineVerify
Proxy method forSignature.verify(byte[])which is executed on the internalSignatureobject.- Specified by:
engineVerifyin classSignatureAlgorithmSpi- Returns:
- true if the signature is correct
- Throws:
XMLSignatureException
-
engineInitVerify
Method engineInitVerify- Specified by:
engineInitVerifyin classSignatureAlgorithmSpi- Throws:
XMLSignatureException
-
engineSign
Proxy method forSignature.sign()which is executed on the internalSignatureobject.- Specified by:
engineSignin classSignatureAlgorithmSpi- Returns:
- the result of the
Signature.sign()method - Throws:
XMLSignatureException
-
engineInitSign
protected void engineInitSign(Key privateKey, SecureRandom secureRandom) throws XMLSignatureException Proxy method forSignature.initSign(java.security.PrivateKey, java.security.SecureRandom)which is executed on the internalSignatureobject.- Specified by:
engineInitSignin classSignatureAlgorithmSpi- Throws:
XMLSignatureException- if this method is called on a MAC
-
engineInitSign
Proxy method forSignature.initSign(java.security.PrivateKey)which is executed on the internalSignatureobject.- Specified by:
engineInitSignin classSignatureAlgorithmSpi- Throws:
XMLSignatureException- if this method is called on a MAC
-
engineUpdate
Proxy method forSignature.update(byte[])which is executed on the internalSignatureobject.- Specified by:
engineUpdatein classSignatureAlgorithmSpi- Throws:
XMLSignatureException
-
engineUpdate
Proxy method forSignature.update(byte[])which is executed on the internalSignatureobject.- Specified by:
engineUpdatein classSignatureAlgorithmSpi- Throws:
XMLSignatureException
-
engineUpdate
Proxy method forSignature.update(byte[], int, int)which is executed on the internalSignatureobject.- Specified by:
engineUpdatein classSignatureAlgorithmSpi- Throws:
XMLSignatureException
-
engineGetJCEAlgorithmString
Proxy method forSignature.getAlgorithm()which is executed on the internalSignatureobject.- Specified by:
engineGetJCEAlgorithmStringin classSignatureAlgorithmSpi- Returns:
- the result of the
Signature.getAlgorithm()method
-
engineGetJCEProviderName
Method engineGetJCEProviderName- Specified by:
engineGetJCEProviderNamein classSignatureAlgorithmSpi- Returns:
- the JCE ProviderName
-
engineSetHMACOutputLength
Method engineSetHMACOutputLength- Specified by:
engineSetHMACOutputLengthin classSignatureAlgorithmSpi- Throws:
XMLSignatureException
-
engineInitSign
protected void engineInitSign(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec) throws XMLSignatureException Proxy method forMacwhich is executed on the internalMac.init(Key)object.- Specified by:
engineInitSignin classSignatureAlgorithmSpi- Throws:
XMLSignatureException- if this method is called on a Signature
-