An assembly used to encrypt/decrypt URLs.
// ------| Original Page |------ //// Create the queryString objectSecureQueryString qs = new SecureQueryString();// Add name/value pairs.qs["Name"] = "TSHAK";qs["SSN"] = "000-00-0000";string url = "DestPage.aspx?x=" + qs.ToString(); // ------| Destination Page |------ //// Simply pass the encrypted string into the constructorSecureQueryString qs = new SecureQueryString(Request["x"]);// Now access the NameValueCollectionstring Name = qs["Name"];string SSN = qs["SSN"]; // ------| Expiring URLs |------ //// Create the queryString objectSecureQueryString qs = new SecureQueryString();// Add name/value pairs.qs["Name"] = "TSHAK";qs["SSN"] = "000-00-0000";// Set the expiration time for one hour from nowqs.ExpireTime = DateTime.Now.AddHours(1);
Get more information
Can't find what you're looking for? Try Google Search!
Comments on "Encrypt and decrypt urls simple code"