I have a strange problem using Auth Component.
This is my AppController.php
App::uses('Controller', 'Controller');
App::uses('Security', 'Utility');
class AppController extends Controller {
public function beforeFilter()
{
parent::beforeFilter();
Security::setHash('sha512');
}
}
As you can see I set sha512 as hash. Now, using AuthComponent I see that the password is not hashed with sha512 but still with sha1, the query Auth Component does is:
SELECT `User`.`id`, `User`.`email`, `User`.`pwd`, `User`.`nome` FROM `example`.`users` AS `User` WHERE `User`.`email` = 'example@example.com' AND `User`.`pwd` = '62d09334d3815d28143792ba12cd386bb7417e1e' LIMIT 1
The password is clearly not sha512.
How to force sha512 in AuthComponent ?
Thanks