What a time based code actually is
The six digits an authenticator shows are not stored anywhere and not retrieved from a server. They are computed, on the spot, from two things: a shared secret both you and the service hold, and the current time.
The recipe is short. Take the current Unix time, divide it by the step length, usually thirty seconds, and floor it to get a counter. Compute a keyed hash of that counter using the secret. Take a few bytes from a position determined by the hash’s own last byte, mask off the sign bit and reduce the result to the required number of digits.
The server does exactly the same arithmetic with the same secret and the same clock, which is why the codes match without any communication. It is also why a device with a badly wrong clock fails to authenticate for reasons that look like nothing to do with time.
Generating a code
- Paste a Base32 secret into the secret field, or import an otpauth URI, or upload a setup QR image.
- Check the algorithm, digits and period. An import fills these in from the URI.
- The code appears immediately and refreshes on its own each period.
- Watch the ring for how long the current code remains valid.
- Use the copy control to put the code on your clipboard.
Why it is a testing tool and not an authenticator
Everything about how this page handles a secret is right for debugging and wrong for daily use.
The secret is typed into a visible field, held in memory only, and discarded on reload. There is no storage, no lock screen, no backup and no sync. If you closed the tab you have to paste it again.
For a developer that is exactly the correct set of properties. You are verifying that your server accepts the codes your library generates, or working out why a user’s codes are being rejected, and you want the secret gone the moment you are done. For your own bank account it is a poor arrangement, because a secret in a browser field is a secret that a screenshot, a shoulder or a shared machine can capture.
Importing rather than typing
Base32 is deliberately awkward to type. Its alphabet excludes the digits zero, one, eight and nine specifically to avoid confusion with letters, which means a paste of a digit heavy string is either correct or obviously invalid rather than subtly wrong. It also means a long secret is tedious and error prone to enter by hand.
So the import path is the one to prefer. An otpauth URI carries the secret and every parameter the service chose, and pasting it configures the whole tool in one action. If all you have is the setup QR image from the enrolment page, upload it and the same URI is read out of it, using the same decoding as QR Code Reader.
The import also refuses things clearly. A counter based URI is named as such rather than dismissed as malformed, because that distinction is the one that actually helps.
The parameters, and when they matter
Almost every service uses SHA-1, six digits and a thirty second period, and the defaults reflect that. SHA-1 here is not a weakness in the way it is for signatures, because the construction depends on the secret rather than on collision resistance.
The other combinations exist because a URI is allowed to specify them, and a testing tool that could only reproduce the common case would fail exactly when you most need it, which is when a service has done something unusual and your codes are being rejected. If you are checking a hash independently, HMAC Generator computes the same keyed hashes directly, and if you need to inspect an encoded value along the way, Base64 Decode is on hand.

