Hi Everyone,
Just a quick question. I'm trying to encrypt a PKCS7 document with
EVP_EncryptInit (for symmetric key encryption). What would be the best
format to output the PKCS7 document (ASN/PEM/SMIME) to be used as an
input for EVP_EncryptInit (which takes unsigned char as input)? I'm
guessing SMIME (which would have to be encoded into uchar), but I would
like to hear from others as well.

    

EVP_EncryptInit() initializes contexts and keys and doesn't have anything ot
do with S/MIME. 

If you mean the data to be encrypted being fed to EVP_EncryptUpdate() and
EVP_EncryptFinal() the format doesn't matter: it isn't interpreted in any way
and you get exactly the same data back when you decrypt.

Steve.
  
Sorry I meant, EVP_EncryptUpdate and EVP_EncryptFinal. My question was, if I want to feed the output of a function which generates a PKCS7 structure to the about EVP functions, what kind of conversion options do I have, so as to feed the PKCS7 structure (or the structure converted to ASN/PEM/SMIME) to the EVP functions. Would a simple cast do the work, or would I need to take some more elaborate measures?

thanks,
Ashu

Reply via email to