コード例 #1
0
        public static string AESEncryption(string plain, string key, bool fips)
        {
            BCEngine bcEngine = new BCEngine(new AesEngine(), Encoding.UTF8);

            bcEngine.SetPadding(new Pkcs7Padding());
            return(bcEngine.Encrypt(plain, key));
        }
コード例 #2
0
        public static string AES_Decryption(string encrypted_text, string Key, bool flps)
        {
            BCEngine bcEngine = new BCEngine(new AesEngine(), Encoding.UTF8);

            bcEngine.SetPadding(new Pkcs7Padding());
            return(bcEngine.Decrypt(encrypted_text, Key));
        }