2
Reply

Encrypt decrypt

trkpower

trkpower

May 27 2008 1:10 PM
7.9k
hi ,
i want to encrypt and decrypt a string.
to encrypt i have this:

string toencode;
byte[] text;
text = Encoding.Unicode.GetBytes(toencode);
SHA256Managed hash = new SHA256Managed();
texto = hash.ComputeHash(text);
Convert.ToBase64String(text);

to decrypt how can i do it?
thanks in advance


Answers (2)