aboutsummaryrefslogtreecommitdiff
path: root/src/tools/otp-code-generator-and-validator/otp.service.ts
diff options
context:
space:
mode:
authorGravatar renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> 2023-08-21 18:27:08 +0000
committerGravatar GitHub <noreply@github.com> 2023-08-21 18:27:08 +0000
commit6ff9a01cc841b9d15c9ccaea4790746b9de2cb4b (patch)
tree01aca2b6077c897f46aa0d66078c81832078738a /src/tools/otp-code-generator-and-validator/otp.service.ts
parenta2b9b157e5b8dd725afd8ed78710bca7deb7e31d (diff)
downloadit-tools-6ff9a01cc841b9d15c9ccaea4790746b9de2cb4b.tar.gz
it-tools-6ff9a01cc841b9d15c9ccaea4790746b9de2cb4b.tar.zst
it-tools-6ff9a01cc841b9d15c9ccaea4790746b9de2cb4b.zip
chore(deps): update dependency @antfu/eslint-config to ^0.40.0 (#552)
* chore(deps): update dependency @antfu/eslint-config to ^0.40.0 * chore(deps): updated eslint --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
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.ts4
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;
}