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;
    }