Solved

AES algorithm

Posted on 2013-01-29
3
272 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

803 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