Changeset 3458 for trunk/modules/auth

Show
Ignore:
Timestamp:
09/14/2008 02:05:01 PM (3 months ago)
Author:
Geert
Message:

Made Auth->find_salt() public so you can do password checking yourself in situations other than user logins. Thanks, jarek_bolo.

See: http://forum.kohanaphp.com/comments.php?DiscussionID=609&page=1#Item_14

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/auth/classes/auth.php

    r3399 r3458  
    137137         * Log out a user by removing the related session variables. 
    138138         * 
    139          * @param   boolean   completely destroy the session 
     139         * @param   boolean  completely destroy the session 
    140140         * @return  boolean 
    141141         */ 
     
    194194         * Perform a hash, using the configured method. 
    195195         * 
    196          * @param   string   string to hash 
     196         * @param   string  string to hash 
    197197         * @return  string 
    198198         */ 
    199         protected function hash($str) 
     199        public function hash($str) 
    200200        { 
    201201                return hash($this->config['hash_method'], $str); 
     
    208208         * @return  string 
    209209         */ 
    210         protected function find_salt($password) 
     210        public function find_salt($password) 
    211211        { 
    212212                $salt = ''; 
     
    214214                foreach ($this->config['salt_pattern'] as $i => $offset) 
    215215                { 
    216                         // Find salt characters... take a good long look.. 
     216                        // Find salt characters, take a good long look... 
    217217                        $salt .= substr($password, $offset + $i, 1); 
    218218                }