fixed method case

This commit is contained in:
antelle 2019-09-25 22:47:44 +02:00
parent e9fbd49864
commit 86b5113c46
1 changed files with 4 additions and 4 deletions

View File

@ -63,9 +63,9 @@ Otp.prototype.next = function(callback) {
const hmac = sig.getUint32(offset) & 0x7fffffff;
let pass;
if (this.issuer === 'Steam') {
pass = Otp.HmacToSteamCode(hmac);
pass = Otp.hmacToSteamCode(hmac);
} else {
pass = Otp.HmacToDigits(hmac, this.digits);
pass = Otp.hmacToDigits(hmac, this.digits);
}
callback(pass, timeLeft);
});
@ -91,13 +91,13 @@ Otp.prototype.hmac = function(data, callback) {
});
};
Otp.HmacToDigits = function(hmac, length) {
Otp.hmacToDigits = function(hmac, length) {
let code = hmac.toString();
code = Otp.leftPad(code.substr(code.length - length), length);
return code;
};
Otp.HmacToSteamCode = function(hmac) {
Otp.hmacToSteamCode = function(hmac) {
const steamChars = '23456789BCDFGHJKMNPQRTVWXY';
let code = '';
for (let i = 0; i < 5; ++i) {