Title: Encrypting with multiple public keys

Berin,

        Is XML encryption using multiple public keys supported by XSEC library? Here is how I encrypt using one key:

XSECCryptoKey   * kek = NULL;
HCRYPTKEY hkey;
CryptImportPublicKeyInfo(win32RSACSP, MY_ENCODING_TYPE,
         &(pCert->pCertInfo->SubjectPublicKeyInfo), &hkey);

kek = new WinCAPICryptoKeyRSA(win32RSACSP, hkey);
kekAlg = ENCRYPT_RSA_15;
cipher->setKEK(kek);

XENCEncryptedKey *xkey  = cipher->encryptKey(keyStr, keyLen, kekAlg);
xenc = cipher->getEncryptedData();
xenc->appendEncryptedKey(xkey);

        How can I set more than one key?

Best regards,
Milan

Reply via email to