1

I have a sql job that sends email to all users everynight. It has a footer with Unsubscibe link which opens the asp.net page. As a querystring, i want to add encrypted EmailID to the link. so i can decrypt and use it to update the database.

How can i use encryption in sql and decrypt in asp.net? Is it possible or is there any other way?

Thanks a lot guys, Remo

3
  • Try this nayyeri.net/how-to-encrypt-query-string-parameters-in-asp-net Commented Apr 20, 2011 at 14:50
  • FWIW encrypting query string parameters is security by obscurity and generally worthless. Commented Apr 20, 2011 at 14:56
  • 2
    Why go through the trouble of encryption/decryption when you are sending the user a link with their own email address in it? You could simply send the GUID for the row to be updated in the database instead, which would save considerable effort and net the same level of obfuscation. Commented Apr 20, 2011 at 14:56

1 Answer 1

2

You could use EncryptByKey and DecryptByKey sql functions (sql-server 2008). In ASP you can always send query to db for decrypting purposes.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.