Make WordPress Core

Changeset 11920


Ignore:
Timestamp:
09/12/2009 08:26:44 AM (15 years ago)
Author:
westi
Message:

Make our hash_hmac compatibility function unit testable even when the real one exists. See #10284.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/compat.php

    r11911 r11920  
    5959if ( !function_exists('hash_hmac') ):
    6060function hash_hmac($algo, $data, $key, $raw_output = false) {
     61    return _hash_hmac($algo, $data, $key, $raw_output);
     62}
     63endif;
     64
     65function _hash_hmac($algo, $data, $key, $raw_output = false) {
    6166    $packs = array('md5' => 'H32', 'sha1' => 'H40');
    6267
     
    7681    return $algo($opad . pack($pack, $algo($ipad . $data)));
    7782}
    78 endif;
    7983
    8084if ( !function_exists('mb_substr') ):
Note: See TracChangeset for help on using the changeset viewer.