Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Liberty 1.2 Java API Reference 10g Release 3 (10.1.3) B25385-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.xmlsec.liberty.v12
Class LibDSigUtils

`java.lang.Object
oracle.security.xmlsec.liberty.v12.LibDSigUtils`

public class LibDSigUtils
extends java.lang.Object

Internal use only. Utility class for signing Liberty messages.

Method Summary
`static oracle.security.xmlsec.dsig.XSSignature` | `addSignature(oracle.security.xmlsec.util.XMLElement msg, java.lang.String referenceTargetID, java.lang.String signatureMethod, java.lang.String c14nMethod, java.lang.String digestMethod, java.lang.String[] nsURIs, java.lang.String[] localNames)` Creates a new XML-DSIG `Signature` element and inserts it into the given message, replacing any exisiting XML-DSIG `Signature` element.
`static java.lang.String` | `signURL(java.lang.String msg, oracle.security.crypto.core.PrivateKey key, java.lang.String sigAlg)` Computes a signature over the given message, using the given private key and signature algorithm, and returns a URL-encoded string suitable for use as a URL query parameter.

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

Method Detail

### addSignature

    public static oracle.security.xmlsec.dsig.XSSignature addSignature(oracle.security.xmlsec.util.XMLElement msg,
                                                                       java.lang.String referenceTargetID,
                                                                       java.lang.String signatureMethod,
                                                                       java.lang.String c14nMethod,
                                                                       java.lang.String digestMethod,
                                                                       java.lang.String[] nsURIs,
                                                                       java.lang.String[] localNames)

  Creates a new XML-DSIG `Signature` element and inserts it into the given message, replacing any exisiting XML-DSIG `Signature` element. This method does not compute the `SignatureValue` or create the `KeyInfo` child element for the `Signature` element.

  Note: The SHA-1 algorithm is used for the Reference's DigestMethod.

  Parameters:
    `msg` - The message the Signature element to be added on.
    `referenceTargetID` - The ID attribute value of the element to be signed.
    `signatureMethod` - The value of the `Algorithm` attribute of the `SignatureMethod` element contained within the new `Signature` element's `SignedInfo` child element.
    `c14nMethod` - The value of the `Algorithm` attribute of the `CanonicalizationMethod` element contained within the new `Signature` element's `SignedInfo` child element .
    `digestMethod` - The value of the `Algorithm` attribute of the `DigestMethod` element of the new `Signature`'s `Reference` element.
    `localNames` - The ordered set of the local names of all the child elements precede the Signature element in the schema for the element represented by the message.
    `nsURIs` - The ordered set of the namespace URIs of the child elements precede the Signature element in the schema for the element represented by the message.
  Returns:
    The new `oracle.security.xmlsec.dsig.XSSignature` object

### signURL

    public static java.lang.String signURL(java.lang.String msg,
                                           oracle.security.crypto.core.PrivateKey key,
                                           java.lang.String sigAlg)
                                    throws oracle.security.xmlsec.dsig.SigningException

  Computes a signature over the given message, using the given private key and signature algorithm, and returns a URL-encoded string suitable for use as a URL query parameter.
  Parameters:
    `msg` - The data to be signed.
    `key` - The private signing key.
    `sigAlg` - The URI identifying the signature algorithm to use.
  Throws:
    `oracle.security.xmlsec.dsig.SigningException` - If an error occurs computing the signature.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Liberty 1.2 Java API Reference 10g Release 3 (10.1.3) B25385-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.