Struggling to find answers to a few basic questions about using Blowfish in Cake 2.4.
AppController.php
public $components = array(
'Auth' => array(
'authenticate' => array(
'Form' => array(
'fields' => array(
'username' => 'email'
),
'passwordHasher' => 'Blowfish'
)
)
),
'Cookie',
'Session'
);
What now? How do I log in?
UsersController.php
public function login() {
if (!empty($this->request->data)) {
if ($this->Auth->login()) {
$this->redirect($this->Auth->redirectUrl());
}
}
}
What do I need to add to this? I'm getting the following error if I try to log in:
Warning (512): Invalid salt: for blowfish Please visit http://www.php.net/crypt and read the appropriate section for building blowfish salts. [CORE/Cake/Utility/Security.php, line 285]
Do I need to salt the password before attempting login, and if so, which method do I use and what is the best thing to use for the salt? Does Cake automatically try to use the salt from the core.php config file for all users?
I'm confused mainly because I don't know which parts of using blowfish in a standard PHP way CakePHP is trying to do automatically for me.