Example #1
0
File: Aes.cs Project: niuniuzhu/RC
        public static void AesEncrypt(Stream i, Stream o, byte[] key, byte[] iv)
        {
            Aes aes = new Aes(key, iv);

            aes.Encrypt(i, o);
        }
Example #2
0
File: Aes.cs Project: niuniuzhu/RC
        public static byte[] AesEncrypt(byte[] data, byte[] key)
        {
            Aes aes = new Aes(key);

            return(aes.Encrypt(data));
        }
Example #3
0
File: Aes.cs Project: niuniuzhu/RC
        public static byte[] AesDecrypt(byte[] data)
        {
            Aes aes = new Aes(CryptoConfig.AES_KEY, CryptoConfig.AES_IV);

            return(aes.Decrypt(data));
        }
Example #4
0
File: Aes.cs Project: niuniuzhu/RC
        public static byte[] AesDecrypt(byte[] data, byte[] key, byte[] iv)
        {
            Aes aes = new Aes(key, iv);

            return(aes.Decrypt(data));
        }
Example #5
0
File: Aes.cs Project: niuniuzhu/RC
        public static void AesDecrypt(Stream i, Stream o, byte[] key)
        {
            Aes aes = new Aes(key);

            aes.Decrypt(i, o);
        }