5

I want the code of Rijndael algorithm to encrypt any given text to store it in a database, I also want to know how to reverse the encryption method, ie: decrypt the encrypted text to use it.

sikas
  • 5,435
  • 28
  • 75
  • 120

3 Answers3

6

There's an existing .NET Framework implementation already.

Alex
  • 576
  • 3
  • 8
  • 2
    +1 Why reinvent the wheel? (unless the goal itself is to do it yourself exercise) – Hemant Aug 02 '10 at 07:33
  • Yes. You can use the implementation in any application that can use .NET framework libraries (Websites, console, windows forms, wpf, silverlight etc) – Hemant Aug 02 '10 at 07:36
4

This resource has what you need:

http://www.obviex.com/samples/Encryption.aspx

Anax
  • 9,122
  • 5
  • 34
  • 68
0

You should take a look at this great solution by Mark Brittingham. This class both includes encryption and decryption methods.

Community
  • 1
  • 1
sshow
  • 8,820
  • 4
  • 51
  • 82