Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xml.security.signature
Class SignedInfo

    java.lang.Object
      org.apache.xml.security.utils.ElementProxy
          org.apache.xml.security.utils.SignatureElementProxy
              org.apache.xml.security.signature.Manifest
                  org.apache.xml.security.signature.SignedInfo

    public class SignedInfo

extends Manifest

Handles `<ds:SignedInfo>` elements This `SignedInfo`element includes the canonicalization algorithm, a signature algorithm, and one or more references.``

Author:
  Christian Geuer-Pollmann

Field Summary

Fields inherited from class org.apache.xml.security.signature.Manifest
`MAXIMUM_REFERENCE_COUNT`

Fields inherited from class org.apache.xml.security.utils.ElementProxy
`baseURI, constructionElement, doc`

Constructor Summary
`SignedInfo(org.w3c.dom.Document doc)` Overwrites `Manifest.addDocument(java.lang.String, java.lang.String, org.apache.xml.security.transforms.Transforms, java.lang.String, java.lang.String, java.lang.String)` because it creates another Element.
`SignedInfo(org.w3c.dom.Document doc, org.w3c.dom.Element signatureMethodElem, org.w3c.dom.Element canonicalizationMethodElem)`
`SignedInfo(org.w3c.dom.Document doc, java.lang.String signatureMethodURI, int hMACOutputLength, java.lang.String canonicalizationMethodURI)` Constructor SignedInfo
`SignedInfo(org.w3c.dom.Document doc, java.lang.String signatureMethodURI, java.lang.String canonicalizationMethodURI)` Constructs `SignedInfo` using given Canonicalization algorithm and Signature algorithm.
`SignedInfo(org.w3c.dom.Element element, java.lang.String baseURI)` Build a `SignedInfo` from an `Element`
`SignedInfo(org.w3c.dom.Element element, java.lang.String baseURI, boolean secureValidation)` Build a `SignedInfo` from an `Element`

Method Summary
`javax.crypto.SecretKey` | `createSecretKey(byte[] secretKeyBytes)` Creates a SecretKey for the appropriate Mac algorithm based on a byte[] array password.
`java.lang.String` | `getBaseLocalName()` Method getBaseLocalName
`java.lang.String` | `getCanonicalizationMethodURI()` Returns the Canonicalization method URI
`byte[]` | `getCanonicalizedOctetStream()` Returns getCanonicalizedOctetStream
`java.lang.String` | `getInclusiveNamespaces()`
`protected SignatureAlgorithm` | `getSignatureAlgorithm()`
`org.w3c.dom.Element` | `getSignatureMethodElement()` Method getSignatureMethodElement
`java.lang.String` | `getSignatureMethodURI()` Returns the Signature method URI
`void` | `signInOctetStream(java.io.OutputStream os)` Output the C14n stream to the given OutputStream.
`boolean` | `verify()` Tests core validation process
`boolean` | `verify(boolean followManifests)` Tests core validation process

Methods inherited from class org.apache.xml.security.signature.Manifest
`addDocument, addResourceResolver, addResourceResolver, generateDigestValues, getId, getLength, getPerManifestResolvers, getReferencedContentAfterTransformsItem, getReferencedContentBeforeTransformsItem, getResolverProperties, getResolverProperty, getSignedContentItem, getSignedContentLength, getVerificationResult, isSecureValidation, item, setId, setResolverProperty, verifyReferences, verifyReferences`

Methods inherited from class org.apache.xml.security.utils.SignatureElementProxy
`getBaseNamespace`

Methods inherited from class org.apache.xml.security.utils.ElementProxy
`addBase64Element, addBase64Text, addBigIntegerElement, addText, addTextElement, createElementForFamily, createElementForFamilyLocal, getBaseURI, getBigIntegerFromChildElement, getBytesFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getTextFromChildElement, getTextFromTextChild, length, registerDefaultPrefixes, setDefaultPrefix, setElement, setXPathNamespaceContext`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SignedInfo

    public SignedInfo(org.w3c.dom.Document doc)
               throws XMLSecurityException

  Overwrites `Manifest.addDocument(java.lang.String, java.lang.String, org.apache.xml.security.transforms.Transforms, java.lang.String, java.lang.String, java.lang.String)` because it creates another Element.

  Parameters:
    `doc` - the `Document` in which `XMLsignature` will be placed
  Throws:
    `XMLSecurityException`

### SignedInfo

    public SignedInfo(org.w3c.dom.Document doc,
                      java.lang.String signatureMethodURI,
                      java.lang.String canonicalizationMethodURI)
               throws XMLSecurityException

  Constructs `SignedInfo` using given Canonicalization algorithm and Signature algorithm.

  Parameters:
    `doc` - `SignedInfo` is placed in this document
    `signatureMethodURI` - URI representation of the Digest and Signature algorithm
    `canonicalizationMethodURI` - URI representation of the Canonicalization method
  Throws:
    `XMLSecurityException`

### SignedInfo

    public SignedInfo(org.w3c.dom.Document doc,
                      java.lang.String signatureMethodURI,
                      int hMACOutputLength,
                      java.lang.String canonicalizationMethodURI)
               throws XMLSecurityException

  Constructor SignedInfo

  Parameters:
    `doc` - `SignedInfo` is placed in this document
    `signatureMethodURI` - URI representation of the Digest and Signature algorithm
    `hMACOutputLength` -
    `canonicalizationMethodURI` - URI representation of the Canonicalization method
  Throws:
    `XMLSecurityException`

### SignedInfo

    public SignedInfo(org.w3c.dom.Document doc,
                      org.w3c.dom.Element signatureMethodElem,
                      org.w3c.dom.Element canonicalizationMethodElem)
               throws XMLSecurityException

Parameters:
  `doc` -
  `signatureMethodElem` -
  `canonicalizationMethodElem` -
Throws:
  `XMLSecurityException`

### SignedInfo

    public SignedInfo(org.w3c.dom.Element element,
                      java.lang.String baseURI)
               throws XMLSecurityException

  Build a `SignedInfo` from an `Element`

  Parameters:
    `element` - `SignedInfo`
    `baseURI` - the URI of the resource where the XML instance was stored
  Throws:
    `XMLSecurityException`
  See Also:
    Question, Answer

### SignedInfo

    public SignedInfo(org.w3c.dom.Element element,
                      java.lang.String baseURI,
                      boolean secureValidation)
               throws XMLSecurityException

  Build a `SignedInfo` from an `Element`

  Parameters:
    `element` - `SignedInfo`
    `baseURI` - the URI of the resource where the XML instance was stored
    `secureValidation` - whether secure validation is enabled or not
  Throws:
    `XMLSecurityException`
  See Also:
    Question, Answer

Method Detail

### verify

    public boolean verify()
                   throws MissingResourceFailureException,
                          XMLSecurityException

  Tests core validation process

  Returns:
    true if verification was successful
  Throws:
    `MissingResourceFailureException`
    `XMLSecurityException`

### verify

    public boolean verify(boolean followManifests)
                   throws MissingResourceFailureException,
                          XMLSecurityException

  Tests core validation process

  Parameters:
    `followManifests` - defines whether the verification process has to verify referenced `ds:Manifest`s, too
  Returns:
    true if verification was successful
  Throws:
    `MissingResourceFailureException`
    `XMLSecurityException`

### getCanonicalizedOctetStream

    public byte[] getCanonicalizedOctetStream()
                                       throws CanonicalizationException,
                                              InvalidCanonicalizerException,
                                              XMLSecurityException

  Returns getCanonicalizedOctetStream

  Returns:
    the canonicalization result octet stream of `SignedInfo` element
  Throws:
    `CanonicalizationException`
    `InvalidCanonicalizerException`
    `XMLSecurityException`

### signInOctetStream

    public void signInOctetStream(java.io.OutputStream os)
                           throws CanonicalizationException,
                                  InvalidCanonicalizerException,
                                  XMLSecurityException

  Output the C14n stream to the given OutputStream.

  Parameters:
    `os` -
  Throws:
    `CanonicalizationException`
    `InvalidCanonicalizerException`
    `XMLSecurityException`

### getCanonicalizationMethodURI

    public java.lang.String getCanonicalizationMethodURI()

  Returns the Canonicalization method URI

  Returns:
    the Canonicalization method URI

### getSignatureMethodURI

    public java.lang.String getSignatureMethodURI()

  Returns the Signature method URI

  Returns:
    the Signature method URI

### getSignatureMethodElement

    public org.w3c.dom.Element getSignatureMethodElement()

  Method getSignatureMethodElement

  Returns:
    returns the SignatureMethod Element

### createSecretKey

    public javax.crypto.SecretKey createSecretKey(byte[] secretKeyBytes)

  Creates a SecretKey for the appropriate Mac algorithm based on a byte[] array password.

  Parameters:
    `secretKeyBytes` -
  Returns:
    the secret key for the SignedInfo element.

### getSignatureAlgorithm

    protected SignatureAlgorithm getSignatureAlgorithm()

### getBaseLocalName

    public java.lang.String getBaseLocalName()

  Method getBaseLocalName

  Overrides:
    `getBaseLocalName` in class `Manifest`
  Returns:
    the localname of the Elements of the sub-class.

### getInclusiveNamespaces

    public java.lang.String getInclusiveNamespaces()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD