| | |
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 barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom customactiondata database datagrid datagridview dataset datastructure date/time datetime datetimepicker degrees development dll draganddrop drawing encryption enum event excel file filename files form format forms function gdi+ gis gtk hash httpwebrequest image index input install java label list listbox mandelbrot math mouseclick mysql operator outlook2003 path photoshop picturebox pixelinversion pixelminversion post programming radians regex remoting richtextbox server sleep snooze socket sql statistics stream string table tables tcp text textbox thread time timer update usercontrol usercontrols validation visualstudio webbrowser webcam wia windows winforms wpf xml





