{"_id":"@otplib/totp","_rev":"10-168a2cb4cdbcf9c9d602907702dfc4f5","name":"@otplib/totp","dist-tags":{"latest":"13.4.1"},"versions":{"13.0.0":{"name":"@otplib/totp","version":"13.0.0","keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password"],"author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"license":"MIT","_id":"@otplib/totp@13.0.0","maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"homepage":"https://otplib.yeojz.dev","bugs":{"url":"https://github.com/yeojz/otplib/issues"},"dist":{"shasum":"82c79dccb45e0137b4636320e976cb6c671f1903","tarball":"https://registry.npmjs.org/@otplib/totp/-/totp-13.0.0.tgz","fileCount":9,"integrity":"sha512-cCR3dNo+fvYWXs0fqjXcmzlhmzvBEXK46Ond09JIoG8utMxGgh2UJTnzfQx1lLhYNZPEhRpBvS1KFnZS46JPvQ==","signatures":[{"sig":"MEQCIA0yKCmx6kUy6L+Y7TZJy/FdrOUzBKlJTcs2Lb7I+TgwAiBFI1XKKOFGuuTTVyu0qwDTyVLdVUzjtAq1vp5fvyoRTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":85433},"main":"./dist/index.cjs","type":"module","_from":"file:otplib-totp-13.0.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest","build":"tsup","clean":"rm -rf dist .tsbuildinfo","test:ci":"vitest run --coverage","typecheck":"tsc --noEmit"},"_npmUser":{"name":"geraldyeo","email":"support@yeojz.dev"},"_resolved":"/tmp/1842329ecde6dd67c9d17edbcae9c479/otplib-totp-13.0.0.tgz","_integrity":"sha512-cCR3dNo+fvYWXs0fqjXcmzlhmzvBEXK46Ond09JIoG8utMxGgh2UJTnzfQx1lLhYNZPEhRpBvS1KFnZS46JPvQ==","repository":{"url":"git+https://github.com/yeojz/otplib.git","type":"git","directory":"packages/totp"},"_npmVersion":"10.8.2","description":"RFC 6238 TOTP implementation for otplib","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"@otplib/uri":"13.0.0","@otplib/core":"13.0.0","@otplib/hotp":"13.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^4.0.16","typescript":"^5.3.3","@repo/testing":"13.0.0","@otplib/plugin-crypto-node":"13.0.0"},"_npmOperationalInternal":{"tmp":"tmp/totp_13.0.0_1768042029425_0.9791511601233991","host":"s3://npm-registry-packages-npm-production"}},"13.0.1":{"name":"@otplib/totp","version":"13.0.1","keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password"],"author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"license":"MIT","_id":"@otplib/totp@13.0.1","maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"homepage":"https://otplib.yeojz.dev","bugs":{"url":"https://github.com/yeojz/otplib/issues"},"dist":{"shasum":"6d04f09d9413e1ac533addd18ac770f4b31d576f","tarball":"https://registry.npmjs.org/@otplib/totp/-/totp-13.0.1.tgz","fileCount":9,"integrity":"sha512-17t2qhM7f2PAEhfwo7RI7cLG2ANN1JBFHybXvnHwzlgAX2Owi/uZ9+RC9s//ns4FATX3gaQlMUgufntOs03eXg==","signatures":[{"sig":"MEUCIHteA+2PHlC9oU1X+e6aKa87D1fIHcl4rHpNL3aQV84vAiEA2aiInE/kXMfYWjIFgRL4bagnj+1WOAlpNh3f5E/J3yc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@otplib%2ftotp@13.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":85433},"main":"./dist/index.cjs","type":"module","_from":"file:otplib-totp-13.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest","build":"tsup","clean":"rm -rf dist .tsbuildinfo","test:ci":"vitest run --coverage","typecheck":"tsc --noEmit"},"_npmUser":{"name":"geraldyeo","email":"support@yeojz.dev"},"_resolved":"/tmp/31a7ab7e9e0f100d87017b370d7c53c4/otplib-totp-13.0.1.tgz","_integrity":"sha512-17t2qhM7f2PAEhfwo7RI7cLG2ANN1JBFHybXvnHwzlgAX2Owi/uZ9+RC9s//ns4FATX3gaQlMUgufntOs03eXg==","repository":{"url":"git+https://github.com/yeojz/otplib.git","type":"git","directory":"packages/totp"},"_npmVersion":"10.8.2","description":"RFC 6238 TOTP implementation for otplib","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"@otplib/uri":"13.0.1","@otplib/core":"13.0.1","@otplib/hotp":"13.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^4.0.16","typescript":"^5.3.3","@repo/testing":"13.0.1","@otplib/plugin-crypto-node":"13.0.1"},"_npmOperationalInternal":{"tmp":"tmp/totp_13.0.1_1768062590386_0.9119697111564653","host":"s3://npm-registry-packages-npm-production"}},"13.0.2":{"name":"@otplib/totp","version":"13.0.2","keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password"],"author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"license":"MIT","_id":"@otplib/totp@13.0.2","maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"homepage":"https://otplib.yeojz.dev","bugs":{"url":"https://github.com/yeojz/otplib/issues"},"dist":{"shasum":"a7e345685696837e8579562adde7ea4e104f0946","tarball":"https://registry.npmjs.org/@otplib/totp/-/totp-13.0.2.tgz","fileCount":11,"integrity":"sha512-Xv9wI4PXGt/bSh/Xj02TguqhMuR2zwnsgIwFNGNHvhdm02l9KKdmoknKKxGJTX20wpERRyP6bap1a+HzX0kxLQ==","signatures":[{"sig":"MEUCIQDM6RVDOyjNP8BwfAYZaFNtmsZASBlBHraGNlqxq48ExQIgVcCyySZa3hHC0KyWj2KLy/aokEhj9FMBjeDE9WLTnjQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@otplib%2ftotp@13.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":87905},"main":"./dist/index.cjs","type":"module","_from":"file:otplib-totp-13.0.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest","build":"tsup","clean":"rm -rf dist .tsbuildinfo","test:ci":"vitest run --coverage","typecheck":"tsc --noEmit"},"_npmUser":{"name":"geraldyeo","email":"support@yeojz.dev"},"_resolved":"/tmp/d522cf8ff923880ed03555e494af6a7e/otplib-totp-13.0.2.tgz","_integrity":"sha512-Xv9wI4PXGt/bSh/Xj02TguqhMuR2zwnsgIwFNGNHvhdm02l9KKdmoknKKxGJTX20wpERRyP6bap1a+HzX0kxLQ==","repository":{"url":"git+https://github.com/yeojz/otplib.git","type":"git","directory":"packages/totp"},"_npmVersion":"10.8.2","description":"RFC 6238 TOTP implementation for otplib","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"@otplib/uri":"13.0.2","@otplib/core":"13.0.2","@otplib/hotp":"13.0.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^4.0.16","typescript":"^5.3.3","@repo/testing":"13.0.1","@otplib/plugin-crypto-node":"13.0.2"},"_npmOperationalInternal":{"tmp":"tmp/totp_13.0.2_1768120929112_0.24782135664203153","host":"s3://npm-registry-packages-npm-production"}},"13.1.0":{"name":"@otplib/totp","version":"13.1.0","keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password"],"author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"license":"MIT","_id":"@otplib/totp@13.1.0","maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"homepage":"https://otplib.yeojz.dev","bugs":{"url":"https://github.com/yeojz/otplib/issues"},"dist":{"shasum":"35d70ef8e234920282cbd5b0f89e9c7ef3e81e56","tarball":"https://registry.npmjs.org/@otplib/totp/-/totp-13.1.0.tgz","fileCount":11,"integrity":"sha512-mEukKW8gxb8pEGL2VPu5zcOwH3lAXTrC6VLo7uhNpn83q9/BTFqDP8m47eygq7kz1MHSDSdL5xbbHJh8OfXY0g==","signatures":[{"sig":"MEQCIGFHBpAsIjrkzPHpdqgISsqSD0HIxmeHFjfr3mFTEaRqAiA90UuP0yImybyPnH/UXKP7i01IFQHxf2YpqzMTA2zKWg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@otplib%2ftotp@13.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":92298},"main":"./dist/index.cjs","type":"module","_from":"file:otplib-totp-13.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest","build":"tsup","clean":"rm -rf dist .tsbuildinfo","test:ci":"vitest run --coverage","typecheck":"tsc --noEmit"},"_npmUser":{"name":"geraldyeo","email":"support@yeojz.dev"},"_resolved":"/tmp/bdd543ff2de0b459193effad9d2c73cd/otplib-totp-13.1.0.tgz","_integrity":"sha512-mEukKW8gxb8pEGL2VPu5zcOwH3lAXTrC6VLo7uhNpn83q9/BTFqDP8m47eygq7kz1MHSDSdL5xbbHJh8OfXY0g==","repository":{"url":"git+https://github.com/yeojz/otplib.git","type":"git","directory":"packages/totp"},"_npmVersion":"10.8.2","description":"RFC 6238 TOTP implementation for otplib","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"@otplib/uri":"13.1.0","@otplib/core":"13.1.0","@otplib/hotp":"13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^4.0.16","typescript":"^5.3.3","@repo/testing":"13.0.1","@otplib/plugin-crypto-node":"13.1.0"},"_npmOperationalInternal":{"tmp":"tmp/totp_13.1.0_1768235702734_0.4375966425047799","host":"s3://npm-registry-packages-npm-production"}},"13.1.1":{"name":"@otplib/totp","version":"13.1.1","keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password"],"author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"license":"MIT","_id":"@otplib/totp@13.1.1","maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"homepage":"https://otplib.yeojz.dev","bugs":{"url":"https://github.com/yeojz/otplib/issues"},"dist":{"shasum":"ac8058d67a3a8aa6cab3b419820f27c040492f16","tarball":"https://registry.npmjs.org/@otplib/totp/-/totp-13.1.1.tgz","fileCount":11,"integrity":"sha512-Bbr8C3fLQeUIiAU5sBltPIvPTsGOCmTBln2TjU8wt36nnWMK1p7SsV+VeAk4VYEsGCc4W/ds4M0Pbx4gJMt88A==","signatures":[{"sig":"MEUCIQDaaAyIW/cQCatKqvGED4CZMZjzR3/ZnV+LPViOkKHWvgIgDHBa+rVstq4t2XCxCGlXsE5pfbcgdDBI7ZPkzBjW+os=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@otplib%2ftotp@13.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":92550},"main":"./dist/index.cjs","type":"module","_from":"file:otplib-totp-13.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest","build":"tsup","clean":"rm -rf dist .tsbuildinfo","test:ci":"vitest run --coverage","typecheck":"tsc --noEmit"},"_npmUser":{"name":"geraldyeo","email":"support@yeojz.dev"},"_resolved":"/tmp/6ec092ef63c2ec05be6eef5efceb076d/otplib-totp-13.1.1.tgz","_integrity":"sha512-Bbr8C3fLQeUIiAU5sBltPIvPTsGOCmTBln2TjU8wt36nnWMK1p7SsV+VeAk4VYEsGCc4W/ds4M0Pbx4gJMt88A==","repository":{"url":"git+https://github.com/yeojz/otplib.git","type":"git","directory":"packages/totp"},"_npmVersion":"10.8.2","description":"RFC 6238 TOTP implementation for otplib","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"@otplib/uri":"13.1.1","@otplib/core":"13.1.1","@otplib/hotp":"13.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^4.0.16","typescript":"^5.3.3","@repo/testing":"13.0.1","@otplib/plugin-crypto-node":"13.1.1"},"_npmOperationalInternal":{"tmp":"tmp/totp_13.1.1_1768406233999_0.2405747709893542","host":"s3://npm-registry-packages-npm-production"}},"13.2.0":{"name":"@otplib/totp","version":"13.2.0","keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password"],"author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"license":"MIT","_id":"@otplib/totp@13.2.0","maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"homepage":"https://otplib.yeojz.dev","bugs":{"url":"https://github.com/yeojz/otplib/issues"},"dist":{"shasum":"b4e40697a2dafe9261d8761611e672e45984dd2f","tarball":"https://registry.npmjs.org/@otplib/totp/-/totp-13.2.0.tgz","fileCount":11,"integrity":"sha512-iNMM1r0azic6yoidXefop4gy0w1cHgm1du1QXkMKnYBG5teQLifmeVYm1AyyxjVh8SoGJoQ+dqmDP5zAnzB+Xw==","signatures":[{"sig":"MEQCIGMs+kJhxGZ/V8Al1EBaHvSIDk/TRmz2/hpSJHkBvXZUAiBZCv1LTXRCt5sw1N2kBi8qD+OgV8ZITOdEgTFqOY1qqQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@otplib%2ftotp@13.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":104861},"main":"./dist/index.cjs","type":"module","_from":"file:otplib-totp-13.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest","build":"tsup","clean":"rm -rf dist .tsbuildinfo","test:ci":"vitest run --coverage","typecheck":"tsc --noEmit"},"_npmUser":{"name":"geraldyeo","email":"support@yeojz.dev"},"_resolved":"/tmp/b53dad9fc7d6c916535c8482e33d26b0/otplib-totp-13.2.0.tgz","_integrity":"sha512-iNMM1r0azic6yoidXefop4gy0w1cHgm1du1QXkMKnYBG5teQLifmeVYm1AyyxjVh8SoGJoQ+dqmDP5zAnzB+Xw==","repository":{"url":"git+https://github.com/yeojz/otplib.git","type":"git","directory":"packages/totp"},"_npmVersion":"10.8.2","description":"RFC 6238 TOTP implementation for otplib","directories":{},"sideEffects":false,"_nodeVersion":"20.20.0","dependencies":{"@otplib/uri":"13.2.0","@otplib/core":"13.2.0","@otplib/hotp":"13.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^4.0.18","typescript":"^5.3.3","@repo/testing":"13.0.1","@otplib/plugin-crypto-node":"13.2.0"},"_npmOperationalInternal":{"tmp":"tmp/totp_13.2.0_1769355450253_0.9311535669077049","host":"s3://npm-registry-packages-npm-production"}},"13.2.1":{"name":"@otplib/totp","version":"13.2.1","keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password"],"author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"license":"MIT","_id":"@otplib/totp@13.2.1","maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"homepage":"https://otplib.yeojz.dev","bugs":{"url":"https://github.com/yeojz/otplib/issues"},"dist":{"shasum":"2c8f8a8d87cf6e440d9050d363dfd24bc25179d6","tarball":"https://registry.npmjs.org/@otplib/totp/-/totp-13.2.1.tgz","fileCount":11,"integrity":"sha512-LzDzAAK3w8rspF3urBnWjOlxso1SCGxX9Pnu/iy+HkC0y0HgiLsW7jhkr2hJ3u4cyBdL/tOKUhhELwsjyvunwQ==","signatures":[{"sig":"MEQCIFc4EWTa/N6uN1HoNIiPLvKqjAiQc64e8oPzs7NRwNLbAiBJb40XqH/PqChLE5yudWMYYe1o+DGxC4OEpGL1FzpROw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@otplib%2ftotp@13.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":104974},"main":"./dist/index.cjs","type":"module","_from":"file:otplib-totp-13.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest","build":"tsup","clean":"rm -rf dist .tsbuildinfo","test:ci":"vitest run --coverage","typecheck":"tsc --noEmit"},"_npmUser":{"name":"geraldyeo","email":"support@yeojz.dev"},"_resolved":"/tmp/a95b63cb7f2f0840acf443bbe2e94a58/otplib-totp-13.2.1.tgz","_integrity":"sha512-LzDzAAK3w8rspF3urBnWjOlxso1SCGxX9Pnu/iy+HkC0y0HgiLsW7jhkr2hJ3u4cyBdL/tOKUhhELwsjyvunwQ==","repository":{"url":"git+https://github.com/yeojz/otplib.git","type":"git","directory":"packages/totp"},"_npmVersion":"10.8.2","description":"RFC 6238 TOTP implementation for otplib","directories":{},"sideEffects":false,"_nodeVersion":"20.20.0","dependencies":{"@otplib/uri":"13.2.1","@otplib/core":"13.2.1","@otplib/hotp":"13.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.1","vitest":"^4.0.18","typescript":"^5.3.3","@repo/testing":"13.0.1","@otplib/plugin-crypto-node":"13.2.1"},"_npmOperationalInternal":{"tmp":"tmp/totp_13.2.1_1769411113660_0.4262267894615539","host":"s3://npm-registry-packages-npm-production"}},"13.3.0":{"name":"@otplib/totp","version":"13.3.0","keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password"],"author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"license":"MIT","_id":"@otplib/totp@13.3.0","maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"homepage":"https://otplib.yeojz.dev","bugs":{"url":"https://github.com/yeojz/otplib/issues"},"dist":{"shasum":"1d1f61cfd1acd773e1051e6b918227ae34545808","tarball":"https://registry.npmjs.org/@otplib/totp/-/totp-13.3.0.tgz","fileCount":11,"integrity":"sha512-XfjGNoN8d9S3Ove2j7AwkVV7+QDFsV7Lm7YwSiezNaHffkWtJ60aJYpmf+01dARdPST71U2ptueMsRJso4sq4A==","signatures":[{"sig":"MEUCIQDiByKq9uzIgBbAXXiPTtPL2h7FJjOEN424//UmCeSYQgIgKAqtxTfw53yJC2sjZxObgCQJCy7MXLjpnOT5BTPXLu0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@otplib%2ftotp@13.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":106270},"main":"./dist/index.cjs","type":"module","_from":"file:otplib-totp-13.3.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest","build":"tsup","clean":"rm -rf dist .tsbuildinfo","test:ci":"vitest run --coverage","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:858f0d2d-b843-4ca6-b26b-71d4dffffe26"}},"_resolved":"/tmp/1df8828115e500d360faf0f946fd7826/otplib-totp-13.3.0.tgz","_integrity":"sha512-XfjGNoN8d9S3Ove2j7AwkVV7+QDFsV7Lm7YwSiezNaHffkWtJ60aJYpmf+01dARdPST71U2ptueMsRJso4sq4A==","repository":{"url":"git+https://github.com/yeojz/otplib.git","type":"git","directory":"packages/totp"},"_npmVersion":"11.6.2","description":"RFC 6238 TOTP implementation for otplib","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","dependencies":{"@otplib/uri":"13.3.0","@otplib/core":"13.3.0","@otplib/hotp":"13.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.0.18","typescript":"^5.9.3","@repo/testing":"13.0.1","@otplib/plugin-crypto-node":"13.3.0"},"_npmOperationalInternal":{"tmp":"tmp/totp_13.3.0_1770906887946_0.9218895827088802","host":"s3://npm-registry-packages-npm-production"}},"13.4.0":{"name":"@otplib/totp","version":"13.4.0","keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password","authenticator","google-authenticator"],"author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"license":"MIT","_id":"@otplib/totp@13.4.0","maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"homepage":"https://otplib.yeojz.dev","bugs":{"url":"https://github.com/yeojz/otplib/issues"},"dist":{"shasum":"f43543435f9ea4c7798913ef8f975462f80fce63","tarball":"https://registry.npmjs.org/@otplib/totp/-/totp-13.4.0.tgz","fileCount":11,"integrity":"sha512-dK+vl0f0ekzf6mCENRI9AKS2NJUC7OjI3+X8e7QSnhQ2WM7I+i4PGpb3QxKi5hxjTtwVuoZwXR2CFtXdcRtNdQ==","signatures":[{"sig":"MEQCH2vcxTXpxHTeJUJhdUwxxqyOkDv8CVaNczOGz6XRFKwCIQCdiv8p11doKnl/XiushJxAxvMKEk4l1doFRQu+oT8I3A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@otplib%2ftotp@13.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":109410},"main":"./dist/index.cjs","type":"module","_from":"file:otplib-totp-13.4.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest","build":"tsup","clean":"rm -rf dist .tsbuildinfo","test:ci":"vitest run --coverage","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:858f0d2d-b843-4ca6-b26b-71d4dffffe26"}},"_resolved":"/tmp/9904253815d8228c2c9d4786203263f9/otplib-totp-13.4.0.tgz","_integrity":"sha512-dK+vl0f0ekzf6mCENRI9AKS2NJUC7OjI3+X8e7QSnhQ2WM7I+i4PGpb3QxKi5hxjTtwVuoZwXR2CFtXdcRtNdQ==","repository":{"url":"git+https://github.com/yeojz/otplib.git","type":"git","directory":"packages/totp"},"_npmVersion":"11.9.0","description":"RFC 6238 TOTP implementation for otplib","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","dependencies":{"@otplib/uri":"13.4.0","@otplib/core":"13.4.0","@otplib/hotp":"13.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.0.18","typescript":"^5.9.3","@repo/testing":"13.0.1","@otplib/plugin-crypto-node":"13.4.0"},"_npmOperationalInternal":{"tmp":"tmp/totp_13.4.0_1773932452484_0.7238725096868703","host":"s3://npm-registry-packages-npm-production"}},"13.4.1":{"name":"@otplib/totp","version":"13.4.1","description":"RFC 6238 TOTP implementation for otplib","license":"MIT","author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"homepage":"https://otplib.yeojz.dev","repository":{"type":"git","url":"git+https://github.com/yeojz/otplib.git","directory":"packages/totp"},"bugs":{"url":"https://github.com/yeojz/otplib/issues"},"keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password","authenticator","google-authenticator"],"sideEffects":false,"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"dependencies":{"@otplib/core":"13.4.1","@otplib/uri":"13.4.1","@otplib/hotp":"13.4.1"},"devDependencies":{"tsup":"^8.5.1","typescript":"^5.9.3","vitest":"^4.1.5","@otplib/plugin-crypto-node":"13.4.1","@repo/testing":"13.0.1"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest","test:ci":"vitest run --coverage","typecheck":"tsc --noEmit","lint":"eslint src/","clean":"rm -rf dist .tsbuildinfo"},"_id":"@otplib/totp@13.4.1","_integrity":"sha512-QOkBVPrf6AM4qZaReZPSk9/I8ATVdZpIISJz115MqeVtcrbcr5llPZ0J7804tpnjnp1vCRkI5Qjd47HhgVteBQ==","_resolved":"/tmp/a34d896e33e90ad7ae8bae4e87ebccca/otplib-totp-13.4.1.tgz","_from":"file:otplib-totp-13.4.1.tgz","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-QOkBVPrf6AM4qZaReZPSk9/I8ATVdZpIISJz115MqeVtcrbcr5llPZ0J7804tpnjnp1vCRkI5Qjd47HhgVteBQ==","shasum":"d789ebd16dbf1946539c57cd4bc3c5961c656d42","tarball":"https://registry.npmjs.org/@otplib/totp/-/totp-13.4.1.tgz","fileCount":11,"unpackedSize":109409,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@otplib%2ftotp@13.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD7TWDhxXMh8dJaJ0EmPIiob9pqiHudxvIpXNDwkbYlvAIhAL1XoW8crmg88uj8Z0hn1RMUwa5nzppMcE9zGiVmNRER"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:858f0d2d-b843-4ca6-b26b-71d4dffffe26"}},"directories":{},"maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/totp_13.4.1_1780134889650_0.5327910048538074"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-10T10:47:09.315Z","modified":"2026-05-30T09:54:50.053Z","13.0.0":"2026-01-10T10:47:09.581Z","13.0.1":"2026-01-10T16:29:50.535Z","13.0.2":"2026-01-11T08:42:09.255Z","13.1.0":"2026-01-12T16:35:02.891Z","13.1.1":"2026-01-14T15:57:14.130Z","13.2.0":"2026-01-25T15:37:30.394Z","13.2.1":"2026-01-26T07:05:13.799Z","13.3.0":"2026-02-12T14:34:48.098Z","13.4.0":"2026-03-19T15:00:52.666Z","13.4.1":"2026-05-30T09:54:49.778Z"},"bugs":{"url":"https://github.com/yeojz/otplib/issues"},"author":{"name":"Gerald Yeo","email":"support@yeojz.dev"},"license":"MIT","homepage":"https://otplib.yeojz.dev","keywords":["otp","totp","rfc6238","2fa","mfa","time-based","one-time-password","authenticator","google-authenticator"],"repository":{"type":"git","url":"git+https://github.com/yeojz/otplib.git","directory":"packages/totp"},"description":"RFC 6238 TOTP implementation for otplib","maintainers":[{"name":"geraldyeo","email":"support@yeojz.dev"}],"readme":"# @otplib/totp\n\nRFC 6238 TOTP implementation for otplib.\n\n## Installation\n\n```bash\nnpm install @otplib/totp\npnpm install @otplib/totp\nyarn add @otplib/totp\n```\n\n## Usage\n\n### generate\n\nGenerate a TOTP code:\n\n```typescript\nimport { generate } from \"@otplib/totp\";\nimport { crypto } from \"@otplib/plugin-crypto-node\";\n\nconst secret = new Uint8Array([\n  0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,\n  0x37, 0x38, 0x39, 0x30,\n]); // 20-byte HMAC key\n\nconst token = await generate({\n  secret, // Required: Uint8Array or Base32 string\n  crypto, // Required: crypto plugin\n  algorithm: \"sha1\", // Optional: 'sha1' | 'sha256' | 'sha512'\n  digits: 6, // Optional: 6 | 7 | 8\n  period: 30, // Optional: time step in seconds\n  epoch: Date.now() / 1000, // Optional: Unix timestamp in seconds (defaults to now)\n});\n```\n\n#### With Base32 secrets\n\nIf your secret is a Base32 string (e.g., from Google Authenticator), provide a `base32` plugin to decode it:\n\n```typescript\nimport { generate } from \"@otplib/totp\";\nimport { crypto } from \"@otplib/plugin-crypto-node\";\nimport { base32 } from \"@otplib/plugin-base32-scure\";\n\nconst token = await generate({\n  secret: \"GEZDGNBVGY3TQOJQGEZDGNBVGY\",\n  crypto,\n  base32, // Required when secret is a string\n});\n```\n\n#### With raw string secrets\n\nIf your secret is a plain string (e.g. a passphrase), convert it to `Uint8Array` first using `stringToBytes` from `@otplib/core`:\n\n```typescript\nimport { generate } from \"@otplib/totp\";\nimport { crypto } from \"@otplib/plugin-crypto-node\";\nimport { stringToBytes } from \"@otplib/core\";\n\nconst token = await generate({\n  secret: stringToBytes(\"mysecretpassphrase\"),\n  crypto,\n});\n```\n\nAlternatively, [`@otplib/plugin-base32-alt`](https://www.npmjs.com/package/@otplib/plugin-base32-alt) provides bypass plugins for secrets in other encodings:\n\n```typescript\nimport { generate } from \"@otplib/totp\";\nimport { crypto } from \"@otplib/plugin-crypto-node\";\nimport { bypassAsHex } from \"@otplib/plugin-base32-alt\";\n\nconst token = await generate({\n  secret: \"48656c6c6f\", // hex-encoded secret\n  base32: bypassAsHex,\n  crypto,\n});\n```\n\n| Name             | Input format     |\n| ---------------- | ---------------- |\n| `bypassAsString` | Raw UTF-8 string |\n| `bypassAsHex`    | Hex string       |\n| `bypassAsBase64` | Base64 string    |\n\n> [!NOTE]\n> Raw string and bypass secrets are **not compatible** with authenticator apps or `otpauth://` URIs, which always expect Base32-encoded secrets.\n\n### verify\n\nVerify a TOTP code:\n\n```typescript\nimport { verify } from \"@otplib/totp\";\nimport { crypto } from \"@otplib/plugin-crypto-node\";\n\nconst result = await verify({\n  secret, // Required: Uint8Array or Base32 string\n  token: \"123456\", // Required: token to verify\n  crypto, // Required: crypto plugin\n  algorithm: \"sha1\", // Optional: hash algorithm\n  digits: 6, // Optional: expected digits\n  period: 30, // Optional: time step in seconds\n  epoch: Date.now() / 1000, // Optional: Unix timestamp in seconds (defaults to now)\n  epochTolerance: 30, // Optional: number or [past, future] tuple\n  afterTimeStep: lastTimeStep, // Optional: reject time steps <= this value (replay protection)\n});\n\n// Returns: { valid: true, delta: number, epoch: number, timeStep: number } | { valid: false }\n```\n\n`epochTolerance` accepts a number (symmetric window `±n` seconds) or a `[past, future]` tuple for asymmetric control (e.g., `[30, 0]` accepts only past tokens, as recommended by RFC 6238 for transmission-delay handling).\n\n`afterTimeStep` is an exclusive lower bound on the matched time step: any match at `timeStep <= afterTimeStep` is rejected. Pass the `timeStep` from the previous successful verification to prevent token reuse.\n\n### getRemainingTime\n\nGet remaining seconds until the next TOTP period. All parameters are optional and default to the current time with a 30-second period:\n\n```typescript\nimport { getRemainingTime } from \"@otplib/totp\";\n\nconst seconds = getRemainingTime(); // uses current time, period=30, t0=0\nconst seconds2 = getRemainingTime(epoch, 30); // explicit time and period\n```\n\n### getTimeStepUsed\n\nGet the current TOTP counter (time step) value. All parameters are optional:\n\n```typescript\nimport { getTimeStepUsed } from \"@otplib/totp\";\n\nconst counter = getTimeStepUsed(); // uses current time, period=30, t0=0\nconst counter2 = getTimeStepUsed(epoch, 30); // explicit time and period\n```\n\n### Sync Variants\n\n`generateSync` and `verifySync` are synchronous alternatives with the same signatures. They require a crypto plugin that supports sync HMAC operations, such as `@otplib/plugin-crypto-node` or `@otplib/plugin-crypto-noble`. Using them with `@otplib/plugin-crypto-web` will throw.\n\n```typescript\nimport { generateSync, verifySync } from \"@otplib/totp\";\nimport { crypto } from \"@otplib/plugin-crypto-node\";\n\nconst secret = new Uint8Array([\n  0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,\n  0x37, 0x38, 0x39, 0x30,\n]);\n\nconst token = generateSync({ secret, crypto });\nconst result = verifySync({ secret, token, crypto });\n```\n\n## Compatibility with Authenticator Apps\n\nRFC 4226 (HOTP) and RFC 6238 (TOTP) define flexible algorithms that allow different hash functions, digit lengths, and time steps. However, most authenticator apps (Google Authenticator, Authy, Microsoft Authenticator, 1Password, etc.) and services offering 2 factor authentication use the following defaults:\n\n| Parameter   | Value         |\n| ----------- | ------------- |\n| `algorithm` | `sha1`        |\n| `digits`    | `6`           |\n| `period`    | `30`          |\n| `secret`    | Base32 string |\n\nIf you are deviating from these values, do validate that it is supported by the target application.\n\nIf you need to provision an authenticator app via QR code, use [`@otplib/uri`](https://www.npmjs.com/package/@otplib/uri) to generate an `otpauth://totp/` URI.\n\n## Documentation\n\nFull documentation available at [otplib.yeojz.dev](https://otplib.yeojz.dev):\n\n- [Getting Started Guide](https://otplib.yeojz.dev/guide/getting-started)\n- [API Reference](https://otplib.yeojz.dev/api/)\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}