mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-01 01:52:18 +01:00
bugfix verify otp
This commit is contained in:
parent
ead4b0bed8
commit
21db65cb38
@ -60,14 +60,14 @@ function sign($a, $apiKey, $debug=false) {
|
||||
}
|
||||
|
||||
// Generate the signature
|
||||
//debug('API key: '.$apiKey); // API key of the client
|
||||
// debug('API key: '.base64_encode($apiKey)); // API key of the client
|
||||
debug('SIGN: '.$qs);
|
||||
|
||||
// the TRUE at the end states we want the raw value, not hexadecimal form
|
||||
$hmac = hash_hmac('sha1', utf8_encode($qs), $apiKey, true);
|
||||
$hmac = base64_encode($hmac);
|
||||
if ($debug) {
|
||||
debug('h='.$hmac);
|
||||
debug('h='.$hmac);
|
||||
}
|
||||
return $hmac;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user