Class JAXBSignatureFactory
- java.lang.Object
-
- javax.xml.crypto.dsig.XMLSignatureFactory
-
- com.sun.xml.ws.security.opt.crypto.jaxb.JAXBSignatureFactory
-
public class JAXBSignatureFactory extends XMLSignatureFactory
- Author:
- Abhijit Das
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.xml.bind.JAXBContextgetJAXBContext()URIDereferencergetURIDereferencer()booleanisFeatureSupported(String string)CanonicalizationMethodnewCanonicalizationMethod(String algorithm, C14NMethodParameterSpec c14NMethodParameterSpec)Creates a CanonicalizationMethod with the specified parametersCanonicalizationMethodnewCanonicalizationMethod(String algorithm, XMLStructure xMLStructure)Creates a CanonicalizationMethod with the specified parametersDigestMethodnewDigestMethod(String algorithm, DigestMethodParameterSpec digestMethodParameterSpec)Creates a DigestMethod with the specified parametersDSAKeyValuenewDSAKeyValue(byte[] p, byte[] q, byte[] g, byte[] y, byte[] j, byte[] seed, byte[] pgenCounter)Creates a DSAKeyValue with the specified parametersstatic JAXBSignatureFactorynewInstance()KeyInfonewKeyInfo(String id, List content)Creates a KeyInfo with the specified parametersKeyInfonewKeyInfo(List content)KeyNamenewKeyName(String name)Creates a KeyName with the specified parametersKeyValuenewKeyValue(List content)Creates a KeyValue with the specified parametersManifestnewManifest(List list)Creates a Manifest with the specified parametersManifestnewManifest(List list, String string)Creates a Manifest with the specified parametersPGPDatanewPGPData(List content)Creates a PGPData with the specified parametersReferencenewReference(String uri, DigestMethod digestMethod)Creates a Reference with the specified URI and digest method.ReferencenewReference(String uri, DigestMethod digestMethod, List transforms, String type, String id)Creates a Reference with the specified parametersReferencenewReference(String uri, DigestMethod digestMethod, List transforms, String type, String id, byte[] digestValue)Creates a Reference with the specified parametersReferencenewReference(String string, DigestMethod digestMethod, List list, Data data, List list0, String string0, String string1)Creates a Reference with the specified parametersRetrievalMethodnewRetrievalMethod(Transforms transforms, String type, String uri)Creates a RetrievalMethod with the specified parametersRSAKeyValuenewRSAKeyValue(byte[] modulas, byte[] exponent)Creates a RSAKeyValue with the specified parametersSignatureMethodnewSignatureMethod(String algorithm, SignatureMethodParameterSpec signatureMethodParameterSpec)Creates a SignatureMethod with the specified parametersSignaturePropertiesnewSignatureProperties(List list, String string)Creates a SignatureProperties with the specified parametersSignaturePropertynewSignatureProperty(List list, String string, String string0)Creates a SignatureProperty with the specified parametersSignedInfonewSignedInfo(CanonicalizationMethod canonicalizationMethod, SignatureMethod signatureMethod, List references)Creates a SignedInfo with the specified parametersSignedInfonewSignedInfo(CanonicalizationMethod canonicalizationMethod, SignatureMethod signatureMethod, List references, String id)Creates a SignedInfo with the specified parametersSPKIDatanewSPKIData(List spkiSexpAndAny)Creates a SPKIData with the specified parametersTransformnewTransform(String algorithm, TransformParameterSpec transformParameterSpec)Creates a Transform with the specified parametersTransformnewTransform(String algorithm, XMLStructure xMLStructure)Creates a Transform with the specified parametersX509DatanewX509Data(List content)Creates a X509Data with the specified parametersX509IssuerSerialnewX509IssuerSerial(String issuer, BigInteger serialno)Creates a X509IssuerSerial with the specified parametersXMLObjectnewXMLObject(List content, String id, String mime, String encoding)Creates a XMLObject with the specified parametersXMLSignaturenewXMLSignature(SignedInfo signedInfo, KeyInfo keyInfo)Creates an XMLSignature and initializes it with the contents of the specified SignedInfo and KeyInfo objects.XMLSignaturenewXMLSignature(SignedInfo signedInfo, KeyInfo keyInfo, List objects, String id, String type)Creates an XMLSignature and initializes it with the specified parameters.XMLSignatureunmarshalXMLSignature(XMLValidateContext xMLValidateContext)XMLSignatureunmarshalXMLSignature(XMLStructure xMLStructure)-
Methods inherited from class javax.xml.crypto.dsig.XMLSignatureFactory
getInstance, getInstance, getInstance, getInstance, getKeyInfoFactory, getMechanismType, getProvider
-
-
-
-
Method Detail
-
newInstance
public static JAXBSignatureFactory newInstance()
-
getJAXBContext
public jakarta.xml.bind.JAXBContext getJAXBContext() throws jakarta.xml.bind.JAXBException- Throws:
jakarta.xml.bind.JAXBException
-
newXMLSignature
public XMLSignature newXMLSignature(SignedInfo signedInfo, KeyInfo keyInfo)
Creates an XMLSignature and initializes it with the contents of the specified SignedInfo and KeyInfo objects.- Specified by:
newXMLSignaturein classXMLSignatureFactory- Parameters:
signedInfo- - signed infokeyInfo- - key info (may be null)- Returns:
- XMLSignature
-
newXMLSignature
public XMLSignature newXMLSignature(SignedInfo signedInfo, KeyInfo keyInfo, List objects, String id, String type)
Creates an XMLSignature and initializes it with the specified parameters.- Specified by:
newXMLSignaturein classXMLSignatureFactory- Parameters:
signedInfo- - the Signed InfokeyInfo- - ths key info (may be null)objects- - a list of XMLObjects (may be null)id- - the id (may be null)type- - the type (may be null)- Returns:
- XMLSignature
-
newReference
public Reference newReference(String uri, DigestMethod digestMethod)
Creates a Reference with the specified URI and digest method.- Specified by:
newReferencein classXMLSignatureFactory- Parameters:
uri-digestMethod-- Returns:
- Reference
-
newReference
public Reference newReference(String uri, DigestMethod digestMethod, List transforms, String type, String id)
Creates a Reference with the specified parameters- Specified by:
newReferencein classXMLSignatureFactory- Parameters:
uri-digestMethod-transforms-type-id-- Returns:
- Reference
-
newReference
public Reference newReference(String uri, DigestMethod digestMethod, List transforms, String type, String id, byte[] digestValue)
Creates a Reference with the specified parameters- Specified by:
newReferencein classXMLSignatureFactory- Parameters:
uri-digestMethod-transforms-type-id-digestValue-- Returns:
- Reference
-
newReference
public Reference newReference(String string, DigestMethod digestMethod, List list, Data data, List list0, String string0, String string1)
Creates a Reference with the specified parameters- Specified by:
newReferencein classXMLSignatureFactory- Parameters:
string-digestMethod-list-data-list0-string0-string1-- Returns:
- Reference
-
newSignedInfo
public SignedInfo newSignedInfo(CanonicalizationMethod canonicalizationMethod, SignatureMethod signatureMethod, List references)
Creates a SignedInfo with the specified parameters- Specified by:
newSignedInfoin classXMLSignatureFactory- Parameters:
canonicalizationMethod-signatureMethod-references-- Returns:
- SignedInfo
-
newSignedInfo
public SignedInfo newSignedInfo(CanonicalizationMethod canonicalizationMethod, SignatureMethod signatureMethod, List references, String id)
Creates a SignedInfo with the specified parameters- Specified by:
newSignedInfoin classXMLSignatureFactory- Parameters:
canonicalizationMethod-signatureMethod-references-id-- Returns:
- SignedInfo
-
newXMLObject
public XMLObject newXMLObject(List content, String id, String mime, String encoding)
Creates a XMLObject with the specified parameters- Specified by:
newXMLObjectin classXMLSignatureFactory- Parameters:
content-id-mime-encoding-- Returns:
- XMLObject
-
newManifest
public Manifest newManifest(List list)
Creates a Manifest with the specified parameters- Specified by:
newManifestin classXMLSignatureFactory- Parameters:
list-- Returns:
- Manifest
-
newManifest
public Manifest newManifest(List list, String string)
Creates a Manifest with the specified parameters- Specified by:
newManifestin classXMLSignatureFactory- Parameters:
list-string-- Returns:
- Manifest
-
newSignatureProperty
public SignatureProperty newSignatureProperty(List list, String string, String string0)
Creates a SignatureProperty with the specified parameters- Specified by:
newSignaturePropertyin classXMLSignatureFactory- Parameters:
list-string-string0-- Returns:
- SignatureProperty
-
newSignatureProperties
public SignatureProperties newSignatureProperties(List list, String string)
Creates a SignatureProperties with the specified parameters- Specified by:
newSignaturePropertiesin classXMLSignatureFactory- Parameters:
list-string-- Returns:
- SignatureProperties
-
newDigestMethod
public DigestMethod newDigestMethod(String algorithm, DigestMethodParameterSpec digestMethodParameterSpec) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates a DigestMethod with the specified parameters- Specified by:
newDigestMethodin classXMLSignatureFactory- Parameters:
algorithm-digestMethodParameterSpec-- Returns:
- DigestMethod
- Throws:
NoSuchAlgorithmExceptionInvalidAlgorithmParameterException
-
newSignatureMethod
public SignatureMethod newSignatureMethod(String algorithm, SignatureMethodParameterSpec signatureMethodParameterSpec) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates a SignatureMethod with the specified parameters- Specified by:
newSignatureMethodin classXMLSignatureFactory- Parameters:
algorithm-signatureMethodParameterSpec-- Returns:
- SignatureMethod
- Throws:
NoSuchAlgorithmExceptionInvalidAlgorithmParameterException
-
newTransform
public Transform newTransform(String algorithm, TransformParameterSpec transformParameterSpec) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates a Transform with the specified parameters- Specified by:
newTransformin classXMLSignatureFactory- Parameters:
algorithm-transformParameterSpec-- Returns:
- Transforms
- Throws:
NoSuchAlgorithmExceptionInvalidAlgorithmParameterException
-
newTransform
public Transform newTransform(String algorithm, XMLStructure xMLStructure) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates a Transform with the specified parameters- Specified by:
newTransformin classXMLSignatureFactory- Parameters:
algorithm-xMLStructure-- Returns:
- Transform
- Throws:
NoSuchAlgorithmExceptionInvalidAlgorithmParameterException
-
newCanonicalizationMethod
public CanonicalizationMethod newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec c14NMethodParameterSpec) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates a CanonicalizationMethod with the specified parameters- Specified by:
newCanonicalizationMethodin classXMLSignatureFactory- Parameters:
algorithm-c14NMethodParameterSpec-- Returns:
- CanonicalizationMethod
- Throws:
NoSuchAlgorithmExceptionInvalidAlgorithmParameterException
-
newCanonicalizationMethod
public CanonicalizationMethod newCanonicalizationMethod(String algorithm, XMLStructure xMLStructure) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
Creates a CanonicalizationMethod with the specified parameters- Specified by:
newCanonicalizationMethodin classXMLSignatureFactory- Parameters:
algorithm-xMLStructure-- Returns:
- CanonicalizationMethod
- Throws:
NoSuchAlgorithmExceptionInvalidAlgorithmParameterException
-
newDSAKeyValue
public DSAKeyValue newDSAKeyValue(byte[] p, byte[] q, byte[] g, byte[] y, byte[] j, byte[] seed, byte[] pgenCounter)
Creates a DSAKeyValue with the specified parameters- Parameters:
p-q-g-y-j-seed-pgenCounter-- Returns:
- DSAKeyValue
-
newKeyInfo
public KeyInfo newKeyInfo(String id, List content)
Creates a KeyInfo with the specified parameters- Parameters:
id-content-- Returns:
- KeyInfo
-
newKeyName
public KeyName newKeyName(String name)
Creates a KeyName with the specified parameters- Parameters:
name-- Returns:
- KeyName
-
newKeyValue
public KeyValue newKeyValue(List content)
Creates a KeyValue with the specified parameters- Parameters:
content-- Returns:
- KeyValue
-
newPGPData
public PGPData newPGPData(List content)
Creates a PGPData with the specified parameters- Parameters:
content-- Returns:
- PGPData
-
newRSAKeyValue
public RSAKeyValue newRSAKeyValue(byte[] modulas, byte[] exponent)
Creates a RSAKeyValue with the specified parameters- Parameters:
modulas-exponent-- Returns:
- RSAKeyValue
-
newRetrievalMethod
public RetrievalMethod newRetrievalMethod(Transforms transforms, String type, String uri)
Creates a RetrievalMethod with the specified parameters- Parameters:
transforms-type-uri-- Returns:
- RetrievalMethod
-
newSPKIData
public SPKIData newSPKIData(List spkiSexpAndAny)
Creates a SPKIData with the specified parameters- Parameters:
spkiSexpAndAny-- Returns:
- SPKIData
-
newX509Data
public X509Data newX509Data(List content)
Creates a X509Data with the specified parameters- Parameters:
content-- Returns:
- X509Data
-
newX509IssuerSerial
public X509IssuerSerial newX509IssuerSerial(String issuer, BigInteger serialno)
Creates a X509IssuerSerial with the specified parameters- Parameters:
issuer-serialno-- Returns:
- X509IssuerSerial
-
unmarshalXMLSignature
public XMLSignature unmarshalXMLSignature(XMLValidateContext xMLValidateContext) throws MarshalException
- Specified by:
unmarshalXMLSignaturein classXMLSignatureFactory- Parameters:
xMLValidateContext-- Returns:
- Throws:
MarshalException
-
unmarshalXMLSignature
public XMLSignature unmarshalXMLSignature(XMLStructure xMLStructure) throws MarshalException
- Specified by:
unmarshalXMLSignaturein classXMLSignatureFactory- Parameters:
xMLStructure-- Returns:
- Throws:
MarshalException
-
isFeatureSupported
public boolean isFeatureSupported(String string)
- Specified by:
isFeatureSupportedin classXMLSignatureFactory- Parameters:
string-- Returns:
-
getURIDereferencer
public URIDereferencer getURIDereferencer()
- Specified by:
getURIDereferencerin classXMLSignatureFactory- Returns:
-
-