private function hashRaw($password, $salt, $function = '', $storedHash = null) {
        if ($function == '') {
            $function = $this->hashFunction;
        }

        if($function !== 'crypt') {
            $calcHash = hash($function, hash($function, $password).$salt);
        } else if(!is_null($storedHash)){
            $calcHash = crypt($password, $storedHash);
        } else {
            throw new Gdn_UserException(t('Unknown hashing/crypting method.'));
        }


        return $calcHash;
    }
private function hashRaw($password, $salt, $function = '', $storedHash = null) {
        if ($function == '') {
            $function = $this->hashFunction;
        }

        if($function !== 'crypt') {
            $calcHash = hash($function, hash($function, $password).$salt);
        } else if(!is_null($storedHash)){
            $calcHash = crypt($password, $storedHash);
        } else {
            throw new Gdn_UserException(t('Unknown hashing/crypting method.'));
        }


        return $calcHash;
    }
private function hashRaw ( $ password , $ salt , $ function = '' , $ storedHash = null ) { if ( $ function == '' ) { $ function = $ this -> hashFunction ; } if ( $ function !== 'crypt' ) { $ calcHash = hash ( $ function , hash ( $ function , $ password ) . $ salt ) ; } else if ( ! is_null ( $ storedHash ) ) { $ calcHash = crypt ( $ password , $ storedHash ) ; } else { throw new Gdn_UserException ( t ( 'Unknown hashing/crypting method.' ) ) ; } return $ calcHash ; }
Hashes a password with a given salt.

@param string $password The password to hash.
@param string $salt The password salt.
@param string $function The hashing function to use.
@param string $storedHash password hash stored in the db.
@return string Returns the password hash.
Hashes a password with a given salt .