09/03/02 22:43:53
// Create a new KeyInfo element.
edElement.KeyInfo = new KeyInfo();
// Add the encrypted key to the
// EncryptedData object.
edElement.KeyInfo.AddClause(new KeyInfoEncryptedKey(ek));
この順序にしたら、出力が
<root>
<EncryptedData Id="EncryptedElement1" ほにゃらら>
<EncryptionMethod Algorithm="URLリンク(www.w3.org)" />
<KeyInfo ほにゃらら>
<EncryptedKey ほにゃらら>
<EncryptionMethod Algorithm="URLリンク(www.w3.org)" />
<KeyInfo ほにゃらら>
<KeyName>rsaKey</KeyName>
</KeyInfo>
<CipherData><CipherValue>ほにゃらら</CipherValue></CipherData>
<ReferenceList>
<DataReference URI="#EncryptedElement1" />
</ReferenceList>
</EncryptedKey>
</KeyInfo>
<CipherData>
<CipherValue>ほにゃらら</CipherValue>
</CipherData>
</EncryptedData>
</root>
ってなった。これで、キーが埋め込まれたっぽくない?