SignatureMethod

SignatureMethod (서명 메서드)

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

출처: Java API Reference

본문

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

<element name="SignatureMethod" type="ds:SignatureMethodType"/>
<complexType name="SignatureMethodType" mixed="true">
  <sequence>
    <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
    <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
  </sequence>
  <attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>

이 인터페이스는 XMLStructureAlgorithmMethod를 확장하며, XML 서명에 사용되는 서명 알고리즘을 나타냅니다.

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

  • getAlgorithm() – 서명 알고리즘을 식별하는 URI를 반환합니다.

인터페이스에는 자주 사용되는 서명 알고리즘의 URI 상수가 정의되어 있습니다.

  • DSA_SHA1 (http://www.w3.org/2000/09/xmldsig#dsa-sha1) – DSA-SHA1 알고리즘입니다.
  • RSA_SHA1 (http://www.w3.org/2000/09/xmldsig#rsa-sha1) – RSA-SHA1 알고리즘입니다.
  • RSA_SHA256 (http://www.w3.org/2001/04/xmldsig-more#rsa-sha256) – RSA-SHA256 알고리즘입니다.
  • HMAC_SHA1 (http://www.w3.org/2000/09/xmldsig#hmac-sha1) – HMAC-SHA1 알고리즘입니다.

더 알아보기 (Learn more)

Java 공식 API