Data Encryption and Decryption
Please support our C# advertiser: DiscountASP.NET – 3 Months Free on C# Web Hosting
![]() |
•
•
Posts: 171
Reputation:
Solved Threads: 16
There are for algorithms of encryption/decryption with in the .Net framework
DES algorithm, RC2 algorithm, Rijindael algorithm and TripleDES algorithm they are represented as classes
First step is to include directive of cryptography
witch is System.Security.Cryptography
Second step is to create your own key, to do that
string password = // you can put here your password
UnicodeEncoding objectEncoding= new UnicodeEncoding();
byte[] key = objectEncoding.GetBytes(password);
third step is to create a stream where the encipted data will be putted
FileStream CryptedFile=new FileStream(cryptFile, FileMode.Create);
encrypt the contents
RijndaelManaged Crpt= new RijndaelManaged();
CryptoStream Encryptor= new CryptoStream(cryptedFile, Crpt.CreateEncryptor(key, key), CryptoStreamMode.Write);
And the the data encryption is done according to the Rajindael algorythm
u can use another algorithms like the DES or u can develop your own encryption algorithm
DES algorithm, RC2 algorithm, Rijindael algorithm and TripleDES algorithm they are represented as classes
First step is to include directive of cryptography
witch is System.Security.Cryptography
Second step is to create your own key, to do that
string password = // you can put here your password
UnicodeEncoding objectEncoding= new UnicodeEncoding();
byte[] key = objectEncoding.GetBytes(password);
third step is to create a stream where the encipted data will be putted
FileStream CryptedFile=new FileStream(cryptFile, FileMode.Create);
encrypt the contents
RijndaelManaged Crpt= new RijndaelManaged();
CryptoStream Encryptor= new CryptoStream(cryptedFile, Crpt.CreateEncryptor(key, key), CryptoStreamMode.Write);
And the the data encryption is done according to the Rajindael algorythm
u can use another algorithms like the DES or u can develop your own encryption algorithm
![]() |
Similar Threads
Other Threads in the C# Forum
- Java Encryption and Decryption (Java)
- Need Technical support for decryption of "encrypted files in windows vista (Windows Vista and Windows 7)
- Encryptor (C++)
- help with encryption! asap (C++)
- ENCRYPTION AND DECRYPTION - How to disable the File menu in a Notepad or any file (VB.NET)
- Login and retrieve user data from database (ASP.NET)
- Any tutorials? (ASP.NET)
- why use c? (C++)
Other Threads in the C# Forum
- Previous Thread: Updating columns in an access database using c#
- Next Thread: datagrid hyperlink
•
•
•
•
Views: 2407 | Replies: 2 | Currently Viewing: 1 (0 members and 1 guests)





Linear Mode