Encrypt ID on front-end and decrypt on back-end I have a front-end form that posts through the ID of a particular element/entry to a back-end controller. Is there any way to encrypt/hash that ID on the front-end, so the plain ID number is not visible, and then decrypt that ID in the back-end controller?
&lt;input type="hidden" name="foo" value="{{ 'bar'|hash }}"&gt;


and then in your controller:

if (($foo = craft()-&gt;request-&gt;getPost('foo')) !== null)
{
    $foo = craft()-&gt;security-&gt;validateData($foo);
}


at which point $foo will either be null (not present), false (present but tampered with), or a string (present and valid)