Anilza,
You can use the classes in the System.Security.Cryptography namespace to
encrypt and decrypt files (which are really just byte streams persisted to
disk).
However, if you want to use a password of some sort, you might want to
consider using the MD5 algorithm to hash the password. Basically, you would
hash the password using the MD5 algoritm, creating a hash string of 128
bits. Once you have that, you can then use that as the key for the Rijndael
encryption routine.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Anilza Popat" <an*******@discussions.microsoft.com> wrote in message
news:0a****************************@phx.gbl...
I would like to know how to encrypt and decrypt files
using c#.
I want a program that asks for password before encrypt or
decrypt the file.
best regards