モジュール java.xml.crypto

インタフェースKeyInfo

すべてのスーパー・インタフェース:
XMLStructure

public interface KeyInfo extends XMLStructure
W3C Recommendation for XML-Signature Syntax and Processing」で定義されているXML KeyInfo要素の表現。 KeyInfoには、XMLStructureのリストが含まれています。それぞれのXMLStructureには、XML署名を検証するために必要なキーを受信者が取得できるようにする情報が格納されています。 XMLスキーマ定義は、次のように定義されます。
 <element name="KeyInfo" type="ds:KeyInfoType"/>
 <complexType name="KeyInfoType" mixed="true">
   <choice maxOccurs="unbounded">
     <element ref="ds:KeyName"/>
     <element ref="ds:KeyValue"/>
     <element ref="ds:RetrievalMethod"/>
     <element ref="ds:X509Data"/>
     <element ref="ds:PGPData"/>
     <element ref="ds:SPKIData"/>
     <element ref="ds:MgmtData"/>
     <any processContents="lax" namespace="##other"/>
     <!-- (1,1) elements from (0,unbounded) namespaces -->
   </choice>
   <attribute name="Id" type="ID" use="optional"/>
 </complexType>
 
KeyInfoインスタンスは、KeyInfoFactoryクラスのnewKeyInfoメソッドの1つを呼び出し、それに1つ以上のXMLStructureのリストおよびオプションのidパラメータを渡すことによって作成されます。たとえば:
   KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
   KeyInfo keyInfo = factory.newKeyInfo
      (Collections.singletonList(factory.newKeyName("Alice"), "keyinfo-1"));
 

KeyInfoオブジェクトは、marshalメソッドを呼び出すことによってもXMLに整列化できます。

導入されたバージョン:
1.6
関連項目: