Encrypt and Decrypt a file using .NET 2.0?



I have some .NET 1.1 code that utilizes this technique for encrypting
and decrypting a file.
http://support.microsoft.com/kb/307010

In .NET 2.0 this approach is not fully supported (a .NET 2.0 build
with these methods, will appear to encrypt and decrypt, but the
resulting decrypted file will be corrupted. I tried encrypting a .bmp
file and then decrypting, the resulting decrypted file under .NET 2.0
is garbage, the .NET 1.1 build works as expected).

I would like to know why this approach is no longer supported, aside
from building a .NET 1.1 class library and referencing it in my .NET
2.0 project, what is the proper way to encrypt and decrypt a file
using ,NET 2.0 and the DES encryption algorithm.

.



Relevant Pages

  • Re: Encryption/Decryption
    ... For encrypting / decrypting multiple files at once, ... >>> successfully, on the desktop, without Windows CE involved. ... The next> thing>>> to do is to build the "init user" app for Windows CE, and run it, and> see>>> if it succeeds. ...
    (microsoft.public.windowsce.app.development)
  • Re: Vigenere Cipher II - how to use files
    ... > Its my program for decrypting and encrypting text. ... so you'll need to check your documentation. ... Same answer as to the the first 'BTW' question. ...
    (comp.lang.c)
  • Re: encryption/decryption
    ... 1.desktop for encrypting (encrypting and decrypting is working perfectly ... fine in win32 desktop application using VC++ samples) ... but when i try to decrypt the encoded file from the pocket pc using the same ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: CryptoAPI and private key /not public/ encryption with CryptEncrypt - can not use CryptHash* fun
    ... >> decrypting with public key. ... > cryptography providers. ... Encrypting with the private key is equivalent to signing. ...
    (microsoft.public.platformsdk.security)
  • Re: encryption/decryption
    ... at pocket pc "client_decrypt" is not decrypting properly.. ... -- "eRiva Systems" - Where Technology Meets Life, ... > 1.desktop for encrypting > a.inituser ...
    (microsoft.public.windowsce.embedded.vc)