Cryptostream with complex files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using a crypto stream to encrypt/decrypt files. It works fine with simple
files like .txt but butchers pdfs and xls. Is there a solid way to
encrypt/decrypt files that are more complex than plain text?
Thanks
 
ghause said:
I'm using a crypto stream to encrypt/decrypt files. It works fine with simple
files like .txt but butchers pdfs and xls. Is there a solid way to
encrypt/decrypt files that are more complex than plain text?

Absolutely - don't do any text conversion! It sounds like your
encryption/decryption code is flaky.

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
 
Back
Top