Make WordPress Core


Ignore:
Timestamp:
05/31/2006 01:40:00 AM (20 years ago)
Author:
ryan
Message:

wp_salt() and more hash work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable-functions.php

    r3810 r3811  
    509509endif;
    510510
     511if ( !function_exists('wp_salt') ) :
     512function wp_salt() {
     513    $salt = get_option('secret');
     514    if ( empty($salt) )
     515        $salt = DB_PASSWORD . DB_USER . DB_NAME . DB_HOST . ABSPATH;
     516
     517    return $salt;
     518}
     519endif;
     520
    511521if ( !function_exists('wp_hash') ) :
    512522function wp_hash($data) {
    513     $secret = get_option('secret');
    514     if ( empty($secret) )
    515         $secret = DB_PASSWORD;
     523    $salt = wp_salt();
    516524
    517525    if ( function_exists('hash_hmac') ) {
    518         return hash_hmac('md5', $data, $secret);
     526        return hash_hmac('md5', $data, $salt);
    519527    } else {
    520         return md5($data . $secret);
     528        return md5($data . $salt);
    521529    }
    522530}
Note: See TracChangeset for help on using the changeset viewer.