public string Decrypt(byte[] iv, byte[] cipher) { return(MachineKeyWrapper.DecryptString(HttpServerUtility.UrlTokenEncode(iv.Concat(cipher).ToArray()))); }
public byte[] Encrypt(string clearText) { var bytes = HttpServerUtility.UrlTokenDecode(MachineKeyWrapper.EncryptString(clearText)); return(Enumerable.Repeat <byte>(0, Program.BlockSize).Concat(bytes).ToArray()); }