JavaTM Platform
Standard Ed. 6

javax.xml.crypto.dsig
接口 DigestMethod

所有超级接口:
AlgorithmMethod, XMLStructure

public interface DigestMethod
     
extends XMLStructure, AlgorithmMethod

W3C Recommendation for XML-Signature Syntax and Processing 中定义的 XML DigestMethod 元素的表示形式。XML Schema Definition 的定义如下:

<element name="DigestMethod" type="ds:DigestMethodType"/>
<complexType name="DigestMethodType" mixed="true">
<sequence>
<any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) namespace -->
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
 
可以通过调用 XMLSignatureFactory 类的 newDigestMethod 方法创建 DigestMethod 实例。

从以下版本开始:
1.6
另请参见:
XMLSignatureFactory.newDigestMethod(String, DigestMethodParameterSpec)

字段摘要
static String RIPEMD160
          RIPEMD-160 摘要方法的算法 URI。
static String SHA1
          SHA1 摘要方法的算法 URI。
static String SHA256
          SHA256 摘要方法的算法 URI。
static String SHA512
          SHA512 摘要方法的算法 URI。
 
方法摘要
 AlgorithmParameterSpec getParameterSpec()
          返回与此 DigestMethod 关联的特定于算法的输入参数。
 
从接口 javax.xml.crypto.XMLStructure 继承的方法
isFeatureSupported
 
从接口 javax.xml.crypto.AlgorithmMethod 继承的方法
getAlgorithm
 

字段详细信息

SHA1

static final String SHA1
SHA1 摘要方法的算法 URI。

另请参见:
常量字段值

SHA256

static final String SHA256
SHA256 摘要方法的算法 URI。

另请参见:
常量字段值

SHA512

static final String SHA512
SHA512 摘要方法的算法 URI。

另请参见:
常量字段值

RIPEMD160

static final String RIPEMD160
RIPEMD-160 摘要方法的算法 URI。

另请参见:
常量字段值
方法详细信息

getParameterSpec

AlgorithmParameterSpec getParameterSpec()
返回与此 DigestMethod 关联的特定于算法的输入参数。

可将返回的参数强制转换为 DigestMethodParameterSpec 对象。

指定者:
接口 AlgorithmMethod 中的 getParameterSpec
返回:
特定于算法的参数(如果未指定该参数,则返回 null

JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策