Path: blob/master/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/DigestMethod.java
41161 views
/*1* Copyright (c) 2005, 2013, 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: DigestMethod.java,v 1.6 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.DigestMethodParameterSpec;32import java.security.spec.AlgorithmParameterSpec;3334/**35* A representation of the XML <code>DigestMethod</code> element as36* 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* <pre>40* <element name="DigestMethod" type="ds:DigestMethodType"/>41* <complexType name="DigestMethodType" 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>DigestMethod</code> instance may be created by invoking the51* {@link XMLSignatureFactory#newDigestMethod newDigestMethod} method52* of the {@link XMLSignatureFactory} class.53*54* @author Sean Mullan55* @author JSR 105 Expert Group56* @since 1.657* @see XMLSignatureFactory#newDigestMethod(String, DigestMethodParameterSpec)58*/59public interface DigestMethod extends XMLStructure, AlgorithmMethod {6061// All methods can be found in RFC 6931.6263/**64* The <a href="http://www.w3.org/2000/09/xmldsig#sha1">65* SHA1</a> digest method algorithm URI.66*/67String SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1";6869/**70* The <a href="http://www.w3.org/2001/04/xmldsig-more#sha224">71* SHA224</a> digest method algorithm URI.72*73* @since 1174*/75String SHA224 = "http://www.w3.org/2001/04/xmldsig-more#sha224";7677/**78* The <a href="http://www.w3.org/2001/04/xmlenc#sha256">79* SHA256</a> digest method algorithm URI.80*/81String SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256";8283/**84* The <a href="http://www.w3.org/2001/04/xmldsig-more#sha384">85* SHA384</a> digest method algorithm URI.86*87* @since 1188*/89String SHA384 = "http://www.w3.org/2001/04/xmldsig-more#sha384";9091/**92* The <a href="http://www.w3.org/2001/04/xmlenc#sha512">93* SHA512</a> digest method algorithm URI.94*/95String SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512";9697/**98* The <a href="http://www.w3.org/2001/04/xmlenc#ripemd160">99* RIPEMD-160</a> digest method algorithm URI.100*/101String RIPEMD160 = "http://www.w3.org/2001/04/xmlenc#ripemd160";102103/**104* The <a href="http://www.w3.org/2007/05/xmldsig-more#sha3-224">105* SHA3-224</a> digest method algorithm URI.106*107* @since 11108*/109String SHA3_224 = "http://www.w3.org/2007/05/xmldsig-more#sha3-224";110111/**112* The <a href="http://www.w3.org/2007/05/xmldsig-more#sha3-256">113* SHA3-256</a> digest method algorithm URI.114*115* @since 11116*/117String SHA3_256 = "http://www.w3.org/2007/05/xmldsig-more#sha3-256";118119/**120* The <a href="http://www.w3.org/2007/05/xmldsig-more#sha3-384">121* SHA3-384</a> digest method algorithm URI.122*123* @since 11124*/125String SHA3_384 = "http://www.w3.org/2007/05/xmldsig-more#sha3-384";126127/**128* The <a href="http://www.w3.org/2007/05/xmldsig-more#sha3-512">129* SHA3-512</a> digest method algorithm URI.130*131* @since 11132*/133String SHA3_512 = "http://www.w3.org/2007/05/xmldsig-more#sha3-512";134135/**136* Returns the algorithm-specific input parameters associated with this137* <code>DigestMethod</code>.138*139* <p>The returned parameters can be typecast to a {@link140* DigestMethodParameterSpec} object.141*142* @return the algorithm-specific parameters (may be <code>null</code> if143* not specified)144*/145AlgorithmParameterSpec getParameterSpec();146}147148149