Hi,

I posted this question earlier but I wasnt a member of mailinglist so some
things went wrong :(


I want to encrypt a plaintext file (about 700Kb) en decrypt it later with
RSA, ofcourse with the openssl lib
Now i am able to encrypt chunks of 200 chars at a time but i cant figure
out how the decrypt them.
I write every encrypted chararray to disk after another.

This is what i do :

while (PTF != EOF)
    Read 200 chars from plaintext file (PTF)
    encrypt the 200 chars
    write the encrypted data to disk
   close PTF
while (EDF != EOF)
    Read ??? chars from encrypted data file(EDF)
    decrypt the ??? chars
    write the plaintext to disk
    close EDF

(org C++ code was not understandable for outsider, because of other classes
and stuff. That´s why i´ve written it in english instead of C code)

Now my question : how do I know how much characters I have to read in to
have a successfull decryption ??
Or am I doing the complete encrypt/decrypt from and to file wrong ??


With kind regards,

Thijs Volders


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to