I am using Zend_Form_Element_Hash to protect csrf on my website. Below is the code in my Form.php
$token = new Zend_Form_Element_Hash('token', 'csrf');
$token->setSalt(md5(uniqid(rand(), TRUE)));
$token->initCsrfToken();
$token->initCsrfValidator();
$this->addElement($token);
When I check for $form->isValid in my controller I always get the below error
The two given tokens do not match
Would appreciate any help here!