I'm looking for this, and i find in the IAIK API the following, that is
part of PKCS7 standard:

1. Use the |EncryptedData(byte[] data)|

constructor for creating a new |EncryptedData| object and
supplying the data to be encrypted from a byte array:

//the data to be encrypted supplied from a byte array:
byte[] data = ...;
EncryptedData encrypted_data = new EncryptedData(data);
2. Setup the cipher for encryption by calling method
|setupCipher(AlgorithmID contentEA, char[] password)|

thereby specifying the PBE-algorithm to be used and the password,

AlgorithmID pbeAlgorithm =
char[] password = ...;
encrypted_data.setupCipher(pbeAlgorithm, password);
3. Prepare the EncryptedData object for transmission by
it into an ASN1Object or immediately DER encoding it. The former
is done by calling the |toASN1Object|

method, the latter by using the |getEncoded|


ASN1Object obj = encrypted_data.toASN1Object();

This mean that you can do a PKCS7 object with certificates, i think it.

Somebody knows what is the c functions that can do the same??

I need encrypt a buffer of bytes with a password and i have to generate
a PCKS format.


************************************************** *****************
Departamento de Ingenieria de la Informacion y las Comunicaciones
Facultad de Informatica
Universidad de Murcia. Campus de Espinardo
30080 Murcia (SPAIN)
Tel.: +34 968 364644
Fax: +34 968 364151
email: lidia.fernandez@dif.um.es
************************************************** *****************

__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org