org.neuclear.xml.xmlsec
Class SignedInfo
java.lang.Object
org.neuclear.xml.AbstractElementProxy
org.neuclear.xml.xmlsec.AbstractXMLSigElement
org.neuclear.xml.xmlsec.SignedInfo
- All Implemented Interfaces:
- ElementProxy
public final class SignedInfo
- extends AbstractXMLSigElement
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SIG_ALG_RSA
public static final int SIG_ALG_RSA
- See Also:
- Constant Field Values
SIG_ALG_DSA
public static final int SIG_ALG_DSA
- See Also:
- Constant Field Values
DSIG_ALG_RSA
public static final java.lang.String DSIG_ALG_RSA
- See Also:
- Constant Field Values
DSIG_ALG_DSA
public static final java.lang.String DSIG_ALG_DSA
- See Also:
- Constant Field Values
JCE_ALG_RSA
public static final java.lang.String JCE_ALG_RSA
- See Also:
- Constant Field Values
JCE_ALG_DSA
public static final java.lang.String JCE_ALG_DSA
- See Also:
- Constant Field Values
SignedInfo
public SignedInfo(Reference[] references,
int sigalg)
throws XMLSecurityException
- Throws:
XMLSecurityException
SignedInfo
public SignedInfo(int sigalg,
int refcount)
throws XMLSecurityException
- Throws:
XMLSecurityException
SignedInfo
public SignedInfo(org.dom4j.Element root,
int sigalg,
boolean enveloped)
throws XMLSecurityException
- Throws:
XMLSecurityException
SignedInfo
public SignedInfo(org.dom4j.Element elem)
throws XMLSecurityException,
InvalidSignatureException
- Throws:
XMLSecurityException
InvalidSignatureException
setEnvelopedReference
public void setEnvelopedReference(org.dom4j.Element elem)
throws XMLSecurityException
- Parameters:
elem -
- Throws:
XMLSecurityException
addEnvelopingReference
public void addEnvelopingReference(org.dom4j.Element elem)
throws XMLSecurityException
- Throws:
XMLSecurityException
addExternalReference
public void addExternalReference(java.lang.String url)
throws XMLSecurityException
- Throws:
XMLSecurityException
getReferences
public final java.util.List getReferences()
- Method getSigningKey
This returns the signing PublicKey if it exists or null if it doesnt.
- Returns:
getPrimaryReferenceElement
public final org.dom4j.Element getPrimaryReferenceElement()
- Returns the Element of the first Reference
- Returns:
getPrimaryReference
public final Reference getPrimaryReference()
- Returns the first Reference
- Returns:
getCanonicalizer
final Canonicalizer getCanonicalizer()
getSignatureAlgorithm
final java.security.Signature getSignatureAlgorithm()
throws XMLSecurityException
- Throws:
XMLSecurityException
canonicalize
public final byte[] canonicalize()
throws XMLSecurityException
- Description copied from interface:
ElementProxy
- Canonicalizes object's XML Representation
- Specified by:
canonicalize in interface ElementProxy- Overrides:
canonicalize in class AbstractElementProxy
- Returns:
- byte array containing the Canonicalized Object
- Throws:
XMLSecurityException
sign
public final byte[] sign(java.security.PrivateKey key)
throws XMLSecurityException
- Signs the SignedInfo and returns the signature
- Parameters:
key -
- Returns:
-
- Throws:
XMLSecurityException
sign
public final byte[] sign(java.lang.String name,
org.neuclear.commons.crypto.signers.Signer signer)
throws XMLSecurityException,
org.neuclear.commons.crypto.signers.NonExistingSignerException,
org.neuclear.commons.crypto.passphraseagents.UserCancellationException
- Throws:
XMLSecurityException
org.neuclear.commons.crypto.signers.NonExistingSignerException
org.neuclear.commons.crypto.passphraseagents.UserCancellationException
sign
public final byte[] sign(org.neuclear.commons.crypto.signers.BrowsableSigner signer,
KeyInfo.CreateKeyInfoCallBack cb)
throws XMLSecurityException,
org.neuclear.commons.crypto.passphraseagents.UserCancellationException
- Throws:
XMLSecurityException
org.neuclear.commons.crypto.passphraseagents.UserCancellationException
verify
public final boolean verify(java.security.PublicKey pub,
byte[] sig)
throws XMLSecurityException
- Throws:
XMLSecurityException
getTagName
public final java.lang.String getTagName()
Copyright © 2002-2004 Antilles Software Ventures SA. All Rights Reserved.