CSharp examples for System.Security.Cryptography:Encrypt Decrypt
Decrypt Static byte array
using System.Security.Cryptography; using System.IO;/* ww w . ja va2 s . c o m*/ using System.Text; using System.Linq; using System.Collections.Generic; using System; public class Main{ private static byte[] DecryptStatic(byte[] cipherData) { MemoryStream stream = new MemoryStream(); CryptoStream stream2 = new CryptoStream(stream, m_StaticRijndael.CreateDecryptor(), CryptoStreamMode.Write); stream2.Write(cipherData, 0, cipherData.Length); stream2.Close(); return stream.ToArray(); } }