public static string EncryptString(string plain, out string key, out string iv) { var crypto = new DataEncryptor(); iv = Convert.ToBase64String(crypto.IV); key = Convert.ToBase64String(crypto.Key); return(crypto.EncryptString(plain)); }