title: How to use SHA512 in CakePHP Auth Component?
body: <p>I have a strange problem using Auth Component.</p>
  
  <p>This is my <strong>AppController.php</strong></p>
  
  <pre><code>App::uses('Controller', 'Controller');
  App::uses('Security', 'Utility');
  
  class AppController extends Controller {
  
      public function beforeFilter()
      {
          parent::beforeFilter();
          Security::setHash('sha512');        
      }
  }
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>The password is clearly <strong>not</strong> sha512.</p>
  
  <p>How to force sha512 in AuthComponent ?</p>
  
  <p>Thanks</p>