function mac256($b64_data, $key) { if (version_compare(PHP_VERSION, '5.1.2') < 0) { $result = hash_hmac4('sha256', $b64_data, $key, true); } else { $result = hash_hmac('sha256', $b64_data, $key, true); //(PHP 5 >= 5.1.2) } return $result; }
function mac256($ent, $key) { if (PHP_VERSION_ID < 50102) { $res = hash_hmac4('sha256', $ent, $key, true); } else { $res = hash_hmac('sha256', $ent, $key, true); //(PHP 5 >= 5.1.2) } return $res; }