Decrypt Static byte array - CSharp System.Security.Cryptography

CSharp examples for System.Security.Cryptography:Encrypt Decrypt

Description

Decrypt Static byte array

Demo Code


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();
            }
}

Related Tutorials