How to encrypt the link any given link in outsystems


How to encrypt the link in the mail given 

You mean encrypt the querystring parameters, right? Use Encrypt() built-in function to build your link.

and to decrypt ???

Encrypt() is one-way.

If you want a two-way encryption, use the functions in CryptoAPI (in the Forge).

I also think that this is the wrong approach to the problem.

Instead of encrypting the uery string, or parts of it, you should be using a random block of text (like from GeneratePassword() or GenerateGUID()), logging it in the DB with an expiration date... say... 72 hours... linking that record to a particular user or other record... and when the user clicks the link, looking that record up, verifying that the link is still active, and once the password reset is done, deleting the record... also have a nightly timer to delete any records greater than the time limit.

That will produce a MUCH more secure system than a two-way encryption.