Changeset 36021 for trunk/src/wp-includes/compat.php
- Timestamp:
- 12/19/2015 05:10:29 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/compat.php
r36020 r36021 218 218 219 219 if ( !function_exists('hash_hmac') ): 220 /** 221 * Compat function to mimic hash_hmac(). 222 * 223 * @ignore 224 * @since 3.2.0 225 * 226 * @see _hash_hmac() 227 * 228 * @param string $algo Hash algorithm. Accepts 'md5' or 'sha1'. 229 * @param string $data Data to be hashed. 230 * @param string $key Secret key to use for generating the hash. 231 * @param bool $raw_output Optional. Whether to output raw binary data (true), 232 * or lowercase hexits (false). Default false. 233 * @return string|false The hash in output determined by `$raw_output`. False if `$algo` 234 * is unknown or invalid. 235 */ 220 236 function hash_hmac($algo, $data, $key, $raw_output = false) { 221 237 return _hash_hmac($algo, $data, $key, $raw_output); … … 223 239 endif; 224 240 241 /** 242 * Internal compat function to mimic hash_hmac(). 243 * 244 * @ignore 245 * @since 3.2.0 246 * 247 * @param string $algo Hash algorithm. Accepts 'md5' or 'sha1'. 248 * @param string $data Data to be hashed. 249 * @param string $key Secret key to use for generating the hash. 250 * @param bool $raw_output Optional. Whether to output raw binary data (true), 251 * or lowercase hexits (false). Default false. 252 * @return string|false The hash in output determined by `$raw_output`. False if `$algo` 253 * is unknown or invalid. 254 */ 225 255 function _hash_hmac($algo, $data, $key, $raw_output = false) { 226 256 $packs = array('md5' => 'H32', 'sha1' => 'H40');
Note: See TracChangeset
for help on using the changeset viewer.