首页 全栈极客与开发辅助内容详情

TOTP Generator: RFC 6238 Codes With Countdown Ring, Google Authenticator Compatible - Paste the secret, read the code, trust the vectors

2026-11-17 3 访客
TOTP Generator: RFC 6238 Codes With Countdown Ring, Google Authenticator Compatible

站点名称:TOTP Generator: RFC 6238 Codes With Countdown Ring, Google Authenticator Compatible

所属分类:全栈极客与开发辅助

官方网址:https://www.9314.cn/tools/totp-generator/en/

SEO查询: 爱站网 站长工具

进入网站

站点介绍

TOTP Generator: RFC 6238 Codes With Countdown Ring, Google Authenticator Compatible

Last month a teammate dropped his phone and shattered the screen - along with two-factor codes for a dozen accounts. For two days of re-binding he asked everyone the same question: is there a place to check whether I copied the seed correctly? This page exists for exactly that moment: paste the secret, read the code, compare it against the phone.

The short version

  • Paste and read: drop in a Base32 secret (spaces stripped, uppercased automatically) and the 6-digit code appears instantly; the 30-second countdown ring swaps the code when it empties, turning red for the final five seconds.
  • Google Authenticator parameters by default: SHA1 / 6 digits / 30 seconds; switchable to SHA256, 8 digits, 60 seconds. otpauth:// links parse (fields auto-fill) and generate (locally drawn QR code for the phone camera).
  • Self-verifying: RFC 6238 Appendix B official vectors built in - with secret 12345678901234567890 at T=59, the SHA1 8-digit code must be 94287082. One click, all green lights; an answer sheet shipped with the standard beats any testimonial.
  • The secret never touches disk: nothing written to localStorage, refresh clears everything; WebCrypto computes locally, zero uploads.

Why this page's code must equal your phone's code

TOTP runs the secret plus the current time step through HMAC: same secret, same 30-second step, and every standards-conforming implementation produces the same digits. So this page's code equals the app's code equals the server's expected code - three parties checking against one RFC 6238.

When they disagree, check three things first: whether the secret was copied in full (compare the Base32 string with spaces stripped), whether the algorithm got switched to SHA-256, whether the period got switched to 60 - nine out of ten mismatches are one of those three.

Secret hygiene: never touching disk is design, not posture

The worst failure mode for a code generator is the secret leaking. This page's answer: the secret lives in memory only, refresh wipes it, and localStorage holds nothing but the three interface preferences. Codes generate fine offline - because there is nothing to call.

The honest counterpart: on shared computers, use and leave; do not leave secrets sitting in the input box. And the secret inside an otpauth link is plaintext Base32 - forwarding the link hands someone the password.

FAQ

Is this compatible with Google Authenticator?

Yes. The page implements RFC 6238 exactly: SHA-1 hashing, 6-digit codes, 30-second periods - the same parameters as Google Authenticator, Microsoft Authenticator, 1Password, Aegis and every mainstream app. The same secret must produce the same code here and on your phone; if it does not, check that the secret was copied in full (compare the Base32 string with spaces stripped), that the algorithm was not switched to SHA-256, and that the period was not switched to 60 seconds.

Is it risky to paste my secret here? Does it get uploaded?

Nothing is uploaded: all computation happens inside this device's browser, there is no upload endpoint, and codes generate fine offline. One extra safeguard matters more: the secret never touches disk - the page does not write it to localStorage, and refreshing clears it; only the algorithm/digits/period interface preferences are stored locally. Even so, do not paste production account secrets on shared computers - use and leave.

What is an otpauth:// link for?

It is the universal binding link used by authenticator apps: otpauth://totp/label?secret=KEY&algorithm=SHA1&digits=6&period=30 packages the secret and its parameters into one scannable URI. Paste it into the left side of this page and the fields fill themselves; conversely, fill a secret and the page builds the link plus a QR code your phone camera can add directly. The secret inside is plaintext Base32 - forwarding the link hands someone your password.

The ring finished but the code did not change - is it stuck?

It is not stuck; the time step has simply not rolled over. TOTP works in 30-second steps: the instant the ring completes, the code refreshes and the ring resets. If you watch at the exact boundary you may catch the ring going from full to full - normal. If a code stays frozen far longer than one full period, refresh the page; if it still misbehaves, the browser is throttling background timers (a common mobile power-saving trick) and it recovers once the tab is foregrounded again.

How can I verify this tool computes correctly?

The RFC 6238 Appendix B official test vectors are built in: with the secret 12345678901234567890 at time T=59, the SHA-1 8-digit code must be 94287082. Click Run test vectors and all seven rows - six SHA-1 plus one SHA-256 - are compared one by one; anything short of all green does not count. An answer sheet shipped with the standard itself beats any "I used it and it felt fine".

中文版:https://www.9314.cn/tools/totp-generator/

 暂无评论,快来抢沙发吧~

发布评论