Hi,
i would to apply Zend_Filter_Encrypt to a password element in my form.

I try this:

$password = new Zend_Form_Element_Password('password');
$password->setLabel('Password')
                   ->addFilter('StringTrim')
                   ->addFilter(new Zend_Filter_Encrypt())
                   ->addValidators(array(
                        'Alnum',
                        array('StringLength', false, array(3, 250))
                    ))
                    ->setRequired(true);


But i get the following message:
*Warning*: mcrypt_generic() [function.mcrypt-generic <http://www.liana.local/core/utenti/function.mcrypt-generic>]: An empty string was passed in *C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Filter\Encrypt\Mcrypt.php* on line *240*

How to automate encryption and descryption from Zend_Form's methods getValue and populate?

Thanks
Antonio


Reply via email to