KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > crypto > dsig > SignatureMethod


1 /*
2  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
3  */

4 /*
5  * $Id: SignatureMethod.java,v 1.5 2005/05/10 16:03:46 mullan Exp $
6  */

7 package javax.xml.crypto.dsig;
8
9 import javax.xml.crypto.AlgorithmMethod;
10 import javax.xml.crypto.XMLStructure;
11 import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec;
12 import java.security.spec.AlgorithmParameterSpec JavaDoc;
13
14 /**
15  * A representation of the XML <code>SignatureMethod</code> element
16  * as defined in the <a HREF="http://www.w3.org/TR/xmldsig-core/">
17  * W3C Recommendation for XML-Signature Syntax and Processing</a>.
18  * The XML Schema Definition is defined as:
19  * <p>
20  * <pre>
21  * &lt;element name="SignatureMethod" type="ds:SignatureMethodType"/&gt;
22  * &lt;complexType name="SignatureMethodType" mixed="true"&gt;
23  * &lt;sequence&gt;
24  * &lt;element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/&gt;
25  * &lt;any namespace="##any" minOccurs="0" maxOccurs="unbounded"/&gt;
26  * &lt;!-- (0,unbounded) elements from (1,1) namespace --&gt;
27  * &lt;/sequence&gt;
28  * &lt;attribute name="Algorithm" type="anyURI" use="required"/&gt;
29  * &lt;/complexType&gt;
30  * </pre>
31  *
32  * A <code>SignatureMethod</code> instance may be created by invoking the
33  * {@link XMLSignatureFactory#newSignatureMethod newSignatureMethod} method
34  * of the {@link XMLSignatureFactory} class.
35  *
36  * @author Sean Mullan
37  * @author JSR 105 Expert Group
38  * @since 1.6
39  * @see XMLSignatureFactory#newSignatureMethod(String, SignatureMethodParameterSpec)
40  */

41 public interface SignatureMethod extends XMLStructure, AlgorithmMethod {
42
43     /**
44      * The <a HREF="http://www.w3.org/2000/09/xmldsig#dsa-sha1">DSAwithSHA1</a>
45      * (DSS) signature method algorithm URI.
46      */

47     static final String JavaDoc DSA_SHA1 =
48     "http://www.w3.org/2000/09/xmldsig#dsa-sha1";
49
50     /**
51      * The <a HREF="http://www.w3.org/2000/09/xmldsig#rsa-sha1">RSAwithSHA1</a>
52      * (PKCS #1) signature method algorithm URI.
53      */

54     static final String JavaDoc RSA_SHA1 =
55     "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
56
57     /**
58      * The <a HREF="http://www.w3.org/2000/09/xmldsig#hmac-sha1">HMAC-SHA1</a>
59      * MAC signature method algorithm URI
60      */

61     static final String JavaDoc HMAC_SHA1 =
62     "http://www.w3.org/2000/09/xmldsig#hmac-sha1";
63
64     /**
65      * Returns the algorithm-specific input parameters of this
66      * <code>SignatureMethod</code>.
67      *
68      * <p>The returned parameters can be typecast to a {@link
69      * SignatureMethodParameterSpec} object.
70      *
71      * @return the algorithm-specific input parameters of this
72      * <code>SignatureMethod</code> (may be <code>null</code> if not
73      * specified)
74      */

75     AlgorithmParameterSpec JavaDoc getParameterSpec();
76 }
77
Popular Tags