library/Garp/Model/Db/AuthLocal.php
protected function _hashPassword(array $data) {
        $config = Zend_Registry::get('config');
        if (!empty($config->auth->adapters->db)) {
            $authVars = $config->auth->adapters->db;
            $credentialColumn = $authVars->credentialColumn;
            $hashMethod       = $authVars->hashMethod;
            $salt             = $authVars->salt;
            if (!empty($data[$credentialColumn])) {
                $data[$credentialColumn] = new Zend_Db_Expr($hashMethod.'(CONCAT('.
                                            $this->getAdapter()->quoteInto('?', $data[$credentialColumn]).
                                            ', '.$this->getAdapter()->quoteInto('?', $salt).'))');
            }
        }
        return $data;
    }
protected function _hashPassword(array $data) {
        $config = Zend_Registry::get('config');
        if (!empty($config->auth->adapters->db)) {
            $authVars = $config->auth->adapters->db;
            $credentialColumn = $authVars->credentialColumn;
            $hashMethod       = $authVars->hashMethod;
            $salt             = $authVars->salt;
            if (!empty($data[$credentialColumn])) {
                $data[$credentialColumn] = new Zend_Db_Expr($hashMethod.'(CONCAT('.
                                            $this->getAdapter()->quoteInto('?', $data[$credentialColumn]).
                                            ', '.$this->getAdapter()->quoteInto('?', $salt).'))');
            }
        }
        return $data;
    }
protected function _hashPassword ( array $ data ) { $ config = Zend_Registry :: get ( 'config' ) ; if ( ! empty ( $ config -> auth -> adapters -> db ) ) { $ authVars = $ config -> auth -> adapters -> db ; $ credentialColumn = $ authVars -> credentialColumn ; $ hashMethod = $ authVars -> hashMethod ; $ salt = $ authVars -> salt ; if ( ! empty ( $ data [ $ credentialColumn ] ) ) { $ data [ $ credentialColumn ] = new Zend_Db_Expr ( $ hashMethod . '(CONCAT(' . $ this -> getAdapter ( ) -> quoteInto ( '?' , $ data [ $ credentialColumn ] ) . ', ' . $ this -> getAdapter ( ) -> quoteInto ( '?' , $ salt ) . '))' ) ; } } return $ data ; }
Hash an incoming password
@param Array $data The new userdata
@return Array The modified userdata
Hash an incoming password