| | |
Data Encryption and Decryption
Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
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 bitmap box buttons c# check checkbox client clock combobox connection console control conversion csharp database datagrid datagridview datagridviewcheckbox dataset datetime degrees draganddrop drawing dynamiccreation encryption enum equation excel file form format formatting forms function gdi+ hospitalmanagementinformationsystem hospitalmanagementsystems httpwebrequest image input install java label list math microsystems mouseclick mysql namevaluepairs operator path photoshop picturebox pixelinversion post powerpacks programming property radians regex remoting richtextbox rows running... serialization server sleep soap socket sql sqlserver stack statistics string table teamsuite temperature text textbox thread time timer update uploadatextfile usercontrol validation visualstudio wait webbrowser whileloop windows windowsformsapplication working wpf write xml





