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