Decrypting cookie using SHA1

Good afternoon all,

I would like to write an irule command so that

- it checks the presence of the cookie named “Test”

- gets the cookie value of the cookie

- performs it’s hash using the SHA1 function to get the provided string value encrypted in the cookie

- rewrites back the decrypted value in the cookie

Would anyone have an example of how I can write that?

Thanks for your help

Try starting with the HTTP::cookie (Click here) and SHA1 (Click here) wiki pages and reply here if you want help.

Aaron

Thanks Aaron for your reply : I am checking different examples but as I’m really new to irules I was just hoping someone used to irules would have an example to get me started because I’m having some troubles with the syntax at the time being :slight_smile: I’m not even able to test the command on the BIG-IP, I’m just giving a model of what we expect which doesn’t make things easy for me. So if anybody has an example nearby, that would be great!