KickJava   Java API By Example, From Geeks To Geeks.

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


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

4 /*
5  * $Id: SignedInfo.java,v 1.7 2005/05/10 16:03:47 mullan Exp $
6  */

7 package javax.xml.crypto.dsig;
8
9 import javax.xml.crypto.XMLStructure;
10 import java.io.InputStream JavaDoc;
11 import java.util.List JavaDoc;
12
13 /**
14  * An representation of the XML <code>SignedInfo</code> element as
15  * defined in the <a HREF="http://www.w3.org/TR/xmldsig-core/">
16  * W3C Recommendation for XML-Signature Syntax and Processing</a>.
17  * The XML Schema Definition is defined as:
18  * <pre><code>
19  * &lt;element name="SignedInfo" type="ds:SignedInfoType"/&gt;
20  * &lt;complexType name="SignedInfoType"&gt;
21  * &lt;sequence&gt;
22  * &lt;element ref="ds:CanonicalizationMethod"/&gt;
23  * &lt;element ref="ds:SignatureMethod"/&gt;
24  * &lt;element ref="ds:Reference" maxOccurs="unbounded"/&gt;
25  * &lt;/sequence&gt;
26  * &lt;attribute name="Id" type="ID" use="optional"/&gt;
27  * &lt;/complexType&gt;
28  * </code></pre>
29  *
30  * A <code>SignedInfo</code> instance may be created by invoking one of the
31  * {@link XMLSignatureFactory#newSignedInfo newSignedInfo} methods of the
32  * {@link XMLSignatureFactory} class.
33  *
34  * @author Sean Mullan
35  * @author JSR 105 Expert Group
36  * @since 1.6
37  * @see XMLSignatureFactory#newSignedInfo(CanonicalizationMethod, SignatureMethod, List)
38  * @see XMLSignatureFactory#newSignedInfo(CanonicalizationMethod, SignatureMethod, List, String)
39  */

40 public interface SignedInfo extends XMLStructure {
41
42     /**
43      * Returns the canonicalization method of this <code>SignedInfo</code>.
44      *
45      * @return the canonicalization method
46      */

47     CanonicalizationMethod getCanonicalizationMethod();
48     
49     /**
50      * Returns the signature method of this <code>SignedInfo</code>.
51      *
52      * @return the signature method
53      */

54     SignatureMethod getSignatureMethod();
55     
56     /**
57      * Returns an {@link java.util.Collections#unmodifiableList
58      * unmodifiable list} of one or more {@link Reference}s.
59      *
60      * @return an unmodifiable list of one or more {@link Reference}s
61      */

62     List JavaDoc getReferences();
63     
64     /**
65      * Returns the optional <code>Id</code> attribute of this
66      * <code>SignedInfo</code>.
67      *
68      * @return the id (may be <code>null</code> if not specified)
69      */

70     String JavaDoc getId();
71
72     /**
73      * Returns the canonicalized signed info bytes after a signing or
74      * validation operation. This method is useful for debugging.
75      *
76      * @return an <code>InputStream</code> containing the canonicalized bytes,
77      * or <code>null</code> if this <code>SignedInfo</code> has not been
78      * signed or validated yet
79      */

80     InputStream JavaDoc getCanonicalizedData();
81 }
82
Popular Tags