Solved

AES algorithm

Posted on 2013-01-29
3
274 Views
Last Modified: 2013-02-15
How will i use AES algorithm in C# to encrypt and decrypt a string
0
Comment
Question by:Aspnet_9
3 Comments
 
LVL 51

Expert Comment

by:Ted Bouskill
ID: 38833437
Use System.Security.Cryptography.RijndaelManaged  If you want examples, search MSDN
0
 
LVL 20

Expert Comment

by:edster9999
ID: 38833442
First step - do not try to code it yourself.

This has already been done many times, in many libraries.  If you do not understand the finer points of encryption, salting values, keys etc then you will make mistakes and end up with very easy to crack encryption.

Google it and reuse code that already exists and is published :

https://www.google.com/search?q=c%23+aes+encryption
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 38847844
There is a complete example to encrypt/decrypt a string with AES at MSDN:
http://msdn.microsoft.com/en-us/library/system.security.cryptography.rijndaelmanaged%28v=VS.90%29.aspx
That will encryt to/from bytes. If you want to encrypt to another string, then try with:
http://www.overset.com/2008/04/17/simple-aes-rijndael-c-encrypt--decrypt-functions/
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question