<div dir="auto">Thank you Brent! I just a few hours ago figured it out myself 😀 I hope I didn't waste to much of your time. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 22, 2019, 22:19 Brent Putman <<a href="mailto:putmanb@georgetown.edu">putmanb@georgetown.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="m_2244274128480677520moz-cite-prefix">On 6/20/19 8:00 PM, Stefan Rasmusson
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Im trying to encrypt a key to be used in a holder
of key subject confirmation. This EncryptedKey will be contained
in a key info element inside the subject confirmation data. All
my research only turns up how to create a keyinfo with encrypted
key when encrypting another element.
<div><br>
</div>
<div>Any ideas on how this could be done?</div>
</div>
<br>
</blockquote>
<p><br>
</p>
<p>org.opensaml.xmlsec.encryption.support.Encrypter contains a
couple of public encryptKey(java.security.Key, ...) methods, which
support encrypting any Java Key to an OpenSAML EncryptedKey. Then
you would just build a KeyInfo as usual with its builder and add
the EncryptedKey via the KeyInfo#getEncrypedKeys().<br>
</p>
</div>
-- <br>
To unsubscribe from this list send an email to <a href="mailto:dev-unsubscribe@shibboleth.net" target="_blank" rel="noreferrer">dev-unsubscribe@shibboleth.net</a></blockquote></div>