public static string decrypt(string cipher, string key) { BCEngine bcEngine = new BCEngine(new TwofishEngine(), Encoding.ASCII); bcEngine.SetPadding(new Pkcs7Padding()); return(bcEngine.Decrypt(cipher, key)); }
public static string encrypt(string plain, string key) { BCEngine bcEngine = new BCEngine(new TwofishEngine(), Encoding.ASCII); bcEngine.SetPadding(new Pkcs7Padding()); return(bcEngine.Encrypt(plain, key)); }