Author: BBuzzi | Posted on: 12/11/2008 1:04:39 PM | Views : 460

Hi,
 
I've created a class to encrypt and decrypt string using the rijndael alghoritm. It's working ok, but only with "simple" characters.
these are my methods:
 
public string EncriptaString(string texto_puro, byte[] key, byte[] iv)
{
byte[] key = System.Text.Encoding.Default.GetBytes("abcdefghijabcdefghijabcdefghij21");
byte[] iv = System.Text.Encoding.Default.GetBytes("0123456789abcdef");
byte[] stringToEncrypt = System.Text.Encoding.Default.GetBytes(texto_puro);

Rijndael rjnAlg = Rijndael.Create();
MemoryStream ms = new MemoryStream();
Crypto ...

Go to the complete details ...