diff options
Diffstat (limited to 'src/tools/otp-code-generator-and-validator/otp.service.ts')
-rw-r--r-- | src/tools/otp-code-generator-and-validator/otp.service.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/otp-code-generator-and-validator/otp.service.ts b/src/tools/otp-code-generator-and-validator/otp.service.ts index fae3d37..fb4c33c 100644 --- a/src/tools/otp-code-generator-and-validator/otp.service.ts +++ b/src/tools/otp-code-generator-and-validator/otp.service.ts @@ -15,7 +15,7 @@ export { }; function hexToBytes(hex: string) { - return (hex.match(/.{1,2}/g) ?? []).map(char => parseInt(char, 16)); + return (hex.match(/.{1,2}/g) ?? []).map(char => Number.parseInt(char, 16)); } function computeHMACSha1(message: string, key: string) { @@ -32,7 +32,7 @@ function base32toHex(base32: string) { .map(value => base32Chars.indexOf(value).toString(2).padStart(5, '0')) .join(''); - const hex = (bits.match(/.{1,8}/g) ?? []).map(chunk => parseInt(chunk, 2).toString(16).padStart(2, '0')).join(''); + const hex = (bits.match(/.{1,8}/g) ?? []).map(chunk => Number.parseInt(chunk, 2).toString(16).padStart(2, '0')).join(''); return hex; } |