Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/xml/crypto/dsig/CanonicalizationMethod.java
38918 views
/*1* Copyright (c) 2005, 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: CanonicalizationMethod.java,v 1.6 2005/05/10 16:03:45 mullan Exp $26*/27package javax.xml.crypto.dsig;2829import java.security.spec.AlgorithmParameterSpec;30import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;3132/**33* A representation of the XML <code>CanonicalizationMethod</code>34* element as defined in the35* <a href="http://www.w3.org/TR/xmldsig-core/">36* W3C Recommendation for XML-Signature Syntax and Processing</a>. The XML37* Schema Definition is defined as:38* <p>39* <pre>40* <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>41* <complexType name="CanonicalizationMethodType" mixed="true">42* <sequence>43* <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>44* <!-- (0,unbounded) elements from (1,1) namespace -->45* </sequence>46* <attribute name="Algorithm" type="anyURI" use="required"/>47* </complexType>48* </pre>49*50* A <code>CanonicalizationMethod</code> instance may be created by invoking51* the {@link XMLSignatureFactory#newCanonicalizationMethod52* newCanonicalizationMethod} method of the {@link XMLSignatureFactory} class.53*54* @author Sean Mullan55* @author JSR 105 Expert Group56* @since 1.657* @see XMLSignatureFactory#newCanonicalizationMethod(String, C14NMethodParameterSpec)58*/59public interface CanonicalizationMethod extends Transform {6061/**62* The <a href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315">Canonical63* XML (without comments)</a> canonicalization method algorithm URI.64*/65final static String INCLUSIVE =66"http://www.w3.org/TR/2001/REC-xml-c14n-20010315";6768/**69* The70* <a href="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">71* Canonical XML with comments</a> canonicalization method algorithm URI.72*/73final static String INCLUSIVE_WITH_COMMENTS =74"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments";7576/**77* The <a href="http://www.w3.org/2001/10/xml-exc-c14n#">Exclusive78* Canonical XML (without comments)</a> canonicalization method algorithm79* URI.80*/81final static String EXCLUSIVE =82"http://www.w3.org/2001/10/xml-exc-c14n#";8384/**85* The <a href="http://www.w3.org/2001/10/xml-exc-c14n#WithComments">86* Exclusive Canonical XML with comments</a> canonicalization method87* algorithm URI.88*/89final static String EXCLUSIVE_WITH_COMMENTS =90"http://www.w3.org/2001/10/xml-exc-c14n#WithComments";9192/**93* Returns the algorithm-specific input parameters associated with this94* <code>CanonicalizationMethod</code>.95*96* <p>The returned parameters can be typecast to a97* {@link C14NMethodParameterSpec} object.98*99* @return the algorithm-specific input parameters (may be100* <code>null</code> if not specified)101*/102AlgorithmParameterSpec getParameterSpec();103}104105106