Path: blob/master/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/SignedInfo.java
41161 views
/*1* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/24/*25* $Id: SignedInfo.java,v 1.7 2005/05/10 16:03:47 mullan Exp $26*/27package javax.xml.crypto.dsig;2829import javax.xml.crypto.XMLStructure;30import java.io.InputStream;31import java.util.List;3233/**34* An representation of the XML <code>SignedInfo</code> element as35* defined in the <a href="http://www.w3.org/TR/xmldsig-core/">36* W3C Recommendation for XML-Signature Syntax and Processing</a>.37* The XML Schema Definition is defined as:38* <pre><code>39* <element name="SignedInfo" type="ds:SignedInfoType"/>40* <complexType name="SignedInfoType">41* <sequence>42* <element ref="ds:CanonicalizationMethod"/>43* <element ref="ds:SignatureMethod"/>44* <element ref="ds:Reference" maxOccurs="unbounded"/>45* </sequence>46* <attribute name="Id" type="ID" use="optional"/>47* </complexType>48* </code></pre>49*50* A <code>SignedInfo</code> instance may be created by invoking one of the51* {@link XMLSignatureFactory#newSignedInfo newSignedInfo} methods of the52* {@link XMLSignatureFactory} class.53*54* @author Sean Mullan55* @author JSR 105 Expert Group56* @since 1.657* @see XMLSignatureFactory#newSignedInfo(CanonicalizationMethod, SignatureMethod, List)58* @see XMLSignatureFactory#newSignedInfo(CanonicalizationMethod, SignatureMethod, List, String)59*/60public interface SignedInfo extends XMLStructure {6162/**63* Returns the canonicalization method of this <code>SignedInfo</code>.64*65* @return the canonicalization method66*/67CanonicalizationMethod getCanonicalizationMethod();6869/**70* Returns the signature method of this <code>SignedInfo</code>.71*72* @return the signature method73*/74SignatureMethod getSignatureMethod();7576/**77* Returns an {@link java.util.Collections#unmodifiableList78* unmodifiable list} of one or more {@link Reference}s.79*80* @return an unmodifiable list of one or more {@link Reference}s81*/82List<Reference> getReferences();8384/**85* Returns the optional <code>Id</code> attribute of this86* <code>SignedInfo</code>.87*88* @return the id (may be <code>null</code> if not specified)89*/90String getId();9192/**93* Returns the canonicalized signed info bytes after a signing or94* validation operation. This method is useful for debugging.95*96* @return an <code>InputStream</code> containing the canonicalized bytes,97* or <code>null</code> if this <code>SignedInfo</code> has not been98* signed or validated yet99*/100InputStream getCanonicalizedData();101}102103104