示例#1
0
        public static string Encryption(string plain, string key, IBlockCipherPadding padding)
        {
            AESEncryptor encriptor = new AESEncryptor();

            encriptor.SetPadding(padding);
            return(encriptor.Encrypt(plain, key));
        }
示例#2
0
        public static string Decryption(string cipher, string key, IBlockCipherPadding padding)
        {
            AESEncryptor encriptor = new AESEncryptor();

            encriptor.SetPadding(padding);
            return(encriptor.Decrypt(cipher, key));
        }