public class SignatureAlgorithm extends Algorithm
baseURI| Constructor and Description |
|---|
SignatureAlgorithm(Document doc,
String algorithmURI)
Constructor SignatureAlgorithm
|
SignatureAlgorithm(Document doc,
String algorithmURI,
int hmacOutputLength)
Constructor SignatureAlgorithm
|
SignatureAlgorithm(Document doc,
String algorithmURI,
int hmacOutputLength,
Provider provider) |
SignatureAlgorithm(Document doc,
String algorithmURI,
Provider provider) |
SignatureAlgorithm(Document doc,
String algorithmURI,
Provider provider,
AlgorithmParameterSpec parameterSpec) |
SignatureAlgorithm(Element element,
String baseURI)
Constructor SignatureAlgorithm
|
SignatureAlgorithm(Element element,
String baseURI,
boolean secureValidation)
Constructor SignatureAlgorithm
|
SignatureAlgorithm(Element element,
String baseURI,
boolean secureValidation,
Provider provider) |
SignatureAlgorithm(Element element,
String baseURI,
Provider provider) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseLocalName()
Method getBaseLocalName
|
String |
getBaseNamespace()
Method getBaseNamespace
|
String |
getJCEAlgorithmString()
Proxy method for
Signature.getAlgorithm()
which is executed on the internal Signature object. |
String |
getJCEProviderName()
Method getJCEProviderName
|
String |
getURI()
Returns the URI representation of Transformation algorithm
|
void |
initSign(Key signingKey)
Proxy method for
Signature.initSign(java.security.PrivateKey)
which is executed on the internal Signature object. |
void |
initSign(Key signingKey,
AlgorithmParameterSpec algorithmParameterSpec)
Proxy method for
Signature.initSign(java.security.PrivateKey)
which is executed on the internal Signature object. |
void |
initSign(Key signingKey,
SecureRandom secureRandom)
Proxy method for
Signature.initSign(java.security.PrivateKey,
java.security.SecureRandom)
which is executed on the internal Signature object. |
void |
initVerify(Key verificationKey)
Proxy method for
Signature.initVerify(java.security.PublicKey)
which is executed on the internal Signature object. |
static void |
register(String algorithmURI,
Class<? extends SignatureAlgorithmSpi> implementingClass)
Registers implementing class of the SignatureAlgorithm with algorithmURI
|
static void |
register(String algorithmURI,
String implementingClass)
Registers implementing class of the SignatureAlgorithm with algorithmURI
|
static void |
registerDefaultAlgorithms()
This method registers the default algorithms.
|
void |
setParameter(AlgorithmParameterSpec params)
Proxy method for
Signature.setParameter(
java.security.spec.AlgorithmParameterSpec)
which is executed on the internal Signature object. |
byte[] |
sign()
Proxy method for
Signature.sign()
which is executed on the internal Signature object. |
void |
update(byte input)
Proxy method for
Signature.update(byte)
which is executed on the internal Signature object. |
void |
update(byte[] input)
Proxy method for
Signature.update(byte[])
which is executed on the internal Signature object. |
void |
update(byte[] buf,
int offset,
int len)
Proxy method for
Signature.update(byte[], int, int)
which is executed on the internal Signature object. |
boolean |
verify(byte[] signature)
Proxy method for
Signature.verify(byte[])
which is executed on the internal Signature object. |
getAlgorithmURI, setAlgorithmURIaddBase64Element, addBase64Text, addBigIntegerElement, addReturnToSelf, addText, addTextElement, appendOther, appendSelf, appendSelf, createElementForFamily, createElementForFamilyLocal, createText, getBaseURI, getBigIntegerFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getFirstChild, getLocalAttribute, getTextFromChildElement, getTextFromTextChild, length, registerDefaultPrefixes, setDefaultPrefix, setDocument, setElement, setElement, setLocalAttribute, setLocalIdAttribute, setXPathNamespaceContextpublic SignatureAlgorithm(Document doc, String algorithmURI) throws XMLSecurityException
doc - algorithmURI - XMLSecurityExceptionpublic SignatureAlgorithm(Document doc, String algorithmURI, Provider provider) throws XMLSecurityException
XMLSecurityExceptionpublic SignatureAlgorithm(Document doc, String algorithmURI, Provider provider, AlgorithmParameterSpec parameterSpec) throws XMLSecurityException
XMLSecurityExceptionpublic SignatureAlgorithm(Document doc, String algorithmURI, int hmacOutputLength) throws XMLSecurityException
doc - algorithmURI - hmacOutputLength - XMLSecurityExceptionpublic SignatureAlgorithm(Document doc, String algorithmURI, int hmacOutputLength, Provider provider) throws XMLSecurityException
XMLSecurityExceptionpublic SignatureAlgorithm(Element element, String baseURI) throws XMLSecurityException
element - baseURI - XMLSecurityExceptionpublic SignatureAlgorithm(Element element, String baseURI, Provider provider) throws XMLSecurityException
XMLSecurityExceptionpublic SignatureAlgorithm(Element element, String baseURI, boolean secureValidation) throws XMLSecurityException
element - baseURI - secureValidation - XMLSecurityExceptionpublic SignatureAlgorithm(Element element, String baseURI, boolean secureValidation, Provider provider) throws XMLSecurityException
XMLSecurityExceptionpublic byte[] sign()
throws XMLSignatureException
Signature.sign()
which is executed on the internal Signature object.Signature.sign() methodXMLSignatureExceptionpublic String getJCEAlgorithmString()
Signature.getAlgorithm()
which is executed on the internal Signature object.Signature.getAlgorithm() methodpublic String getJCEProviderName()
public void update(byte[] input)
throws XMLSignatureException
Signature.update(byte[])
which is executed on the internal Signature object.input - XMLSignatureExceptionpublic void update(byte input)
throws XMLSignatureException
Signature.update(byte)
which is executed on the internal Signature object.input - XMLSignatureExceptionpublic void update(byte[] buf,
int offset,
int len)
throws XMLSignatureException
Signature.update(byte[], int, int)
which is executed on the internal Signature object.buf - offset - len - XMLSignatureExceptionpublic void initSign(Key signingKey) throws XMLSignatureException
Signature.initSign(java.security.PrivateKey)
which is executed on the internal Signature object.signingKey - XMLSignatureExceptionpublic void initSign(Key signingKey, SecureRandom secureRandom) throws XMLSignatureException
Signature.initSign(java.security.PrivateKey,
java.security.SecureRandom)
which is executed on the internal Signature object.signingKey - secureRandom - XMLSignatureExceptionpublic void initSign(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec) throws XMLSignatureException
Signature.initSign(java.security.PrivateKey)
which is executed on the internal Signature object.signingKey - algorithmParameterSpec - XMLSignatureExceptionpublic void setParameter(AlgorithmParameterSpec params) throws XMLSignatureException
Signature.setParameter(
java.security.spec.AlgorithmParameterSpec)
which is executed on the internal Signature object.params - XMLSignatureExceptionpublic void initVerify(Key verificationKey) throws XMLSignatureException
Signature.initVerify(java.security.PublicKey)
which is executed on the internal Signature object.verificationKey - XMLSignatureExceptionpublic boolean verify(byte[] signature)
throws XMLSignatureException
Signature.verify(byte[])
which is executed on the internal Signature object.signature - XMLSignatureExceptionpublic final String getURI()
public static void register(String algorithmURI, String implementingClass) throws AlgorithmAlreadyRegisteredException, ClassNotFoundException, XMLSignatureException
algorithmURI - algorithmURI URI representation of SignatureAlgorithm.implementingClass - implementingClass the implementing class of
SignatureAlgorithmSpiAlgorithmAlreadyRegisteredException - if specified algorithmURI is already registeredXMLSignatureExceptionSecurityException - if a security manager is installed and the
caller does not have permission to register the signature algorithmClassNotFoundExceptionpublic static void register(String algorithmURI, Class<? extends SignatureAlgorithmSpi> implementingClass) throws AlgorithmAlreadyRegisteredException, ClassNotFoundException, XMLSignatureException
algorithmURI - algorithmURI URI representation of SignatureAlgorithm.implementingClass - implementingClass the implementing class of
SignatureAlgorithmSpiAlgorithmAlreadyRegisteredException - if specified algorithmURI is already registeredXMLSignatureExceptionSecurityException - if a security manager is installed and the
caller does not have permission to register the signature algorithmClassNotFoundExceptionpublic static void registerDefaultAlgorithms()
public String getBaseNamespace()
getBaseNamespace in class SignatureElementProxypublic String getBaseLocalName()
getBaseLocalName in class ElementProxyCopyright © 2000–2020 The Apache Software Foundation. All rights reserved.