public static string SerpentDecryption(byte[] cipher, byte[] key) { SerpentAlgo bcEngine = new SerpentAlgo(new SerpentEngine(), ASCIIEncoding.ASCII); bcEngine.SetPadding(new Pkcs7Padding()); return(bcEngine.Decrypt(cipher, key)); }
public static byte[] SerpentEncryption(string plain, byte[] key) { SerpentAlgo bcEngine = new SerpentAlgo(new SerpentEngine(), ASCIIEncoding.ASCII); bcEngine.SetPadding(new Pkcs7Padding()); return(bcEngine.Encrypt(plain, key)); }