Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/javax/xml/crypto/dsig/SignatureMethod.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: SignatureMethod.java,v 1.5 2005/05/10 16:03:46 mullan Exp $26*/27package javax.xml.crypto.dsig;2829import javax.xml.crypto.AlgorithmMethod;30import javax.xml.crypto.XMLStructure;31import javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec;32import java.security.spec.AlgorithmParameterSpec;3334/**35* A representation of the XML <code>SignatureMethod</code> element36* as defined in the <a href="http://www.w3.org/TR/xmldsig-core/">37* W3C Recommendation for XML-Signature Syntax and Processing</a>.38* The XML Schema Definition is defined as:39* <p>40* <pre>41* <element name="SignatureMethod" type="ds:SignatureMethodType"/>42* <complexType name="SignatureMethodType" mixed="true">43* <sequence>44* <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>45* <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>46* <!-- (0,unbounded) elements from (1,1) namespace -->47* </sequence>48* <attribute name="Algorithm" type="anyURI" use="required"/>49* </complexType>50* </pre>51*52* A <code>SignatureMethod</code> instance may be created by invoking the53* {@link XMLSignatureFactory#newSignatureMethod newSignatureMethod} method54* of the {@link XMLSignatureFactory} class.55*56* @author Sean Mullan57* @author JSR 105 Expert Group58* @since 1.659* @see XMLSignatureFactory#newSignatureMethod(String, SignatureMethodParameterSpec)60*/61public interface SignatureMethod extends XMLStructure, AlgorithmMethod {6263// All methods can be found in RFC 6931.6465/**66* The <a href="http://www.w3.org/2000/09/xmldsig#dsa-sha1">DSA-SHA1</a>67* (DSS) signature method algorithm URI.68*/69String DSA_SHA1 =70"http://www.w3.org/2000/09/xmldsig#dsa-sha1";7172/**73* The <a href="http://www.w3.org/2000/09/xmldsig#rsa-sha1">RSA-SHA1</a>74* (PKCS #1) signature method algorithm URI.75*/76String RSA_SHA1 =77"http://www.w3.org/2000/09/xmldsig#rsa-sha1";7879/**80* The <a href="http://www.w3.org/2000/09/xmldsig#hmac-sha1">HMAC-SHA1</a>81* MAC signature method algorithm URI82*/83String HMAC_SHA1 =84"http://www.w3.org/2000/09/xmldsig#hmac-sha1";8586/**87* Returns the algorithm-specific input parameters of this88* <code>SignatureMethod</code>.89*90* <p>The returned parameters can be typecast to a {@link91* SignatureMethodParameterSpec} object.92*93* @return the algorithm-specific input parameters of this94* <code>SignatureMethod</code> (may be <code>null</code> if not95* specified)96*/97AlgorithmParameterSpec getParameterSpec();98}99100101