Bug #21465 ยป openid-hash.diff
typo3/sysext/openid/lib/php-openid/Auth/OpenID/HMAC.php (working copy) | ||
---|---|---|
*/
|
||
function Auth_OpenID_HMACSHA1($key, $text)
|
||
{
|
||
if (Auth_OpenID::bytes($key) > Auth_OpenID_SHA1_BLOCKSIZE) {
|
||
if (function_exists('hash_hmac') && function_exists('hash_algos') && in_array('sha1', hash_algos())) {
|
||
return hash_hmac('sha1', $text, $key, true);
|
||
}
|
||
// Home-made solution
|
||
if (Auth_OpenID::bytes($key) > Auth_OpenID_SHA1_BLOCKSIZE) {
|
||
$key = Auth_OpenID_SHA1($key, true);
|
||
}
|
||