| | |
Data Encryption and Decryption
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
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
- 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: C# Detect Input In TextBox
- Next Thread: web form
| Thread Tools | Search this Thread |
.net access algorithm array asp.net barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom database databaseconnection datagrid datagridview dataset datetime dbconnection degrees design development draganddrop drawing encryption enum event eventhandlers excel file firefox form format forms function gdi+ grantorrevokepermissionthroughc#.net httpwebrequest image index input install java label libraries list listbox loop mandelbrot marshalbyrefobject math mouseclick movingimage mysql mysql.data.client operator path photoshop php picturebox pixelinversion post programming radians regex remoting resourcefile richtextbox server sleep socket sql statistics stream string study system.servicemodel table tcpclientchannel text textbox thread time timer update usercontrol validation visualstudio webbrowser windows winforms wpf wpfc# xml





