public EncryptedQueryString(string encryptedData) { // Decrypt data passed in using DPAPI byte[] RawData = HexEncoding.GetBytes(encryptedData); byte[] ClearRawData = ProtectedData.Unprotect( RawData, null, DataProtectionScope.LocalMachine); string StringData = Encoding.UTF8.GetString(ClearRawData); // Split the data and add the contents int Index; string[] SplittedData = StringData.Split(new char[] { '&' }); foreach (string SingleData in SplittedData) { Index = SingleData.IndexOf('='); base.Add( HttpUtility.UrlDecode(SingleData.Substring(0, Index)), HttpUtility.UrlDecode(SingleData.Substring(Index + 1)) ); } }