Skip navigation links

Oracle Fusion Middleware Liberty 1.2 Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10671-04


oracle.security.xmlsec.liberty.v12
Class LibDSigUtils

java.lang.Object
  extended by 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, java.security.PrivateKey key, java.lang.String sigAlgURI)
          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,
                                       java.security.PrivateKey key,
                                       java.lang.String sigAlgURI)
                                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.
sigAlgURI - The URI identifying the signature algorithm to use.
Throws:
oracle.security.xmlsec.dsig.SigningException - If an error occurs computing the signature.

Skip navigation links

Oracle Fusion Middleware Liberty 1.2 Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10671-04


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