KeyValue

KeyValue (키 값)

W3C 권장 사항인 XML-Signature Syntax and Processing에 정의된 XML KeyValue 요소의 표현입니다.

출처: Java API Reference

본문

KeyValue 객체는 서명 검증에 유용한 단일 공개 키를 담고 있습니다.

XML 스키마 정의는 다음과 같습니다.

<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>

주요 메서드는 다음과 같습니다.

  • getPublicKey() – 이 KeyValue에 담긴 공개 키를 반환합니다.

KeyValueXMLStructure를 확장합니다. 다음 표준 공개 키 알고리즘에 대한 키 값을 지원합니다.

  • DSAKeyValue – DSA 공개 키 (http://www.w3.org/2000/09/xmldsig#DSAKeyValue).
  • RSAKeyValue – RSA 공개 키 (http://www.w3.org/2000/09/xmldsig#RSAKeyValue).

KeyValueKeyInfoFactory.newKeyValue로 생성할 수 있으며, validate() 메서드로 감싼 발신자 키가 유효한지 확인할 수도 있습니다.

더 알아보기 (Learn more)

Java 공식 API