|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 | |||||||||
public interface KeyValue
「W3C Recommendation for XML-Signature Syntax and Processing 」로 정의되고 있는 XML KeyValue 요소의 표현. KeyValue 객체에는, 서명의 검증에 편리한 단일의 공개키가 포함됩니다. XML schema 정의는, 다음과 같이 정의됩니다.
<element name="KeyValue" type="ds:KeyValueType"/>
<complexType name="KeyValueType" mixed="true">
<choice>
<element ref="ds:DSAKeyValue"/>
<element ref="ds:RSAKeyValue"/>
<any namespace="##other" processContents="lax"/>
</choice>
</complexType>
<element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
<complexType name="DSAKeyValueType">
<sequence>
<sequence minOccurs="0">
<element name="P" type="ds:CryptoBinary"/>
<element name="Q" type="ds:CryptoBinary"/>
</sequence>
<element name="G" type="ds:CryptoBinary" minOccurs="0"/>
<element name="Y" type="ds:CryptoBinary"/>
<element name="J" type="ds:CryptoBinary" minOccurs="0"/>
<sequence minOccurs="0">
<element name="Seed" type="ds:CryptoBinary"/>
<element name="PgenCounter" type="ds:CryptoBinary"/>
</sequence>
</sequence>
</complexType>
<element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
<complexType name="RSAKeyValueType">
<sequence>
<element name="Modulus" type="ds:CryptoBinary"/>
<element name="Exponent" type="ds:CryptoBinary"/>
</sequence>
</complexType>
KeyValue 인스턴스는,KeyInfoFactory 클래스의 newKeyValue 메소드를 호출해, 공개키의 값을 표현하는 PublicKey 에 건네주는 것에 의해 작성됩니다. 다음에,KeyStore 내에 포함되는 Certificate DSAPublicKey 로부터 KeyValue 를 작성하는 예를 나타냅니다.
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
PublicKey dsaPublicKey = keyStore.getCertificate("myDSASigningCert"). getPublicKey();
KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
KeyValue keyValue = factory.newKeyValue(dsaPublicKey);
이 클래스는, 형 DSAPublicKey 및 RSAPublicKey 의 객체로서 각각 DSAKeyValue 및 RSAKeyValue 를 돌려줍니다. schema내의 모든 필드가, 이러한 형태의 파라미터로서 액세스 가능인 것은 아닙니다.
KeyInfoFactory.newKeyValue(PublicKey) | 필드의 개요 | |
|---|---|
static String |
DSA_TYPE
DSA KeyValue KeyInfo 형을 식별하는 URI: http://www.w3.org/2000/09/xmldsig#DSAKeyValue. |
static String |
RSA_TYPE
RSA KeyValue KeyInfo 형을 식별하는 URI: http://www.w3.org/2000/09/xmldsig#RSAKeyValue. |
| 메소드의 개요 | |
|---|---|
PublicKey |
getPublicKey ()
이 KeyValue 의 공개키를 돌려줍니다. |
| 인터페이스 javax.xml.crypto. XMLStructure 로부터 상속된 메소드 |
|---|
isFeatureSupported |
| 필드의 상세 |
|---|
static final String DSA_TYPE
RetrievalMethod 클래스의 type 파라미터의 값으로 해서 지정해, 원격의 DSAKeyValue 구조를 기술할 수 있습니다.
static final String RSA_TYPE
RetrievalMethod 클래스의 type 파라미터의 값으로 해서 지정해, 원격의 RSAKeyValue 구조를 기술할 수 있습니다.
| 메소드의 상세 |
|---|
PublicKey getPublicKey()
throws KeyException
KeyValue 의 공개키를 돌려줍니다.
KeyValue 의 공개키
KeyException - KeyValue 를
PublicKey 로 변환할 수 없는 경우
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
| 개요: 상자 | 필드 | 생성자 | 메소드 | 상세 : 필드 | 생성자 | 메소드 | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.