Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_hash_hmac [ WordPress Function ]

_hash_hmac ( $algo, $data, $key, $raw_output = false )
Defined at:

Soorgelijke functies: hash_hmac, has_meta, has_action, wp_hash, has_tag


No description yet.

Source


<?php
function _hash_hmac($algo$data$key$raw_output false) {
    
$packs = array('md5' => 'H32''sha1' => 'H40');

    if ( !isset(
$packs[$algo]) )
        return 
false;

    
$pack $packs[$algo];

    if (
strlen($key) > 64)
        
$key pack($pack$algo($key));

    
$key str_pad($key64chr(0));

    
$ipad = (substr($key064) ^ str_repeat(chr(0x36), 64));
    
$opad = (substr($key064) ^ str_repeat(chr(0x5C), 64));

    
$hmac $algo($opad pack($pack$algo($ipad $data)));

    if ( 
$raw_output )
        return 
pack$pack$hmac );
    return 
$hmac;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics