| | |
Data Encryption and Decryption
![]() |
•
•
Join Date: Oct 2007
Posts: 172
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
- Login and retrieve user data from database (ASP.NET)
- 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)
- Any tutorials? (ASP.NET)
- why use c? (C++)
Other Threads in the C# Forum
- Previous Thread: C# Detect Input In TextBox
- Next Thread: web form
Views: 3649 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for C#
.net 2d access algorithm application array barchart bitmap box button buttons c# chat check checkbox class color combo control conversion csharp custom database datagrid datagridview dataset datetime degrees deployment draganddrop drawing encryption enum excel file files form format forms function game gcd gdi+ graphics grid http httpwebrequest image index input interface java list listbox login math mouseclick mysql object oracle path pda photoshop picturebox pixel print programming recursion regex remote remoting resource resourcefile richtextbox save saving search serialization server sleep socket sql statistics string text textbox thread time timer treeview update validation view visual webbrowser webcam windows winforms wpf xml





