error('No Auth Component found'); } $this->out('Using: ' . $class); while (empty($pwToHash) || mb_strlen($pwToHash) < 2) { $pwToHash = $this->in('Password to Hash (2 characters at least)'); } if ($authType = Configure::read('Passwordable.authType')) { list($plugin, $authType) = pluginSplit($authType, true); $className = $authType . 'PasswordHasher'; App::uses($className, $plugin . 'Controller/Component/Auth'); $passwordHasher = new $className(); $pw = $passwordHasher->hash($pwToHash); } else { $class = new $class(new ComponentCollection()); $pw = $class->password($pwToHash); } $this->hr(); $this->out($pw); } /** * PwdShell::help() * * @return void */ public function help() { $this->out('-- Hash Passwort with Auth(Ext) Component --'); $this->out('-- cake Tools.Pwd hash'); $this->out('---- using the salt of the core.php (!)'); } }