Exemples
A conventional six-digit authenticator
Use the public RFC test secret with 6 digits and a 30-second interval. The current answer changes with time; never use this published secret for an account.
Entrée
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
6 digits · 30-second period
Matches native HMAC for the current counter window.- Nom
RFC6238-public-test- Longueur du code
6- Décalage de l'époque (T0)
0- Intervalle (T1)
30
An eight-digit code
Use the public RFC test secret with 8 digits and a 30-second interval. The current answer changes with time; never use this published secret for an account.
Entrée
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
8 digits · 30-second period
Matches native HMAC for the current counter window.- Nom
RFC6238-public-test- Longueur du code
8- Décalage de l'époque (T0)
0- Intervalle (T1)
30
A one-minute interval
Use the public RFC test secret with 6 digits and a 60-second interval. The current answer changes with time; never use this published secret for an account.
Entrée
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
6 digits · 60-second period
Matches native HMAC for the current counter window.- Nom
RFC6238-public-test- Longueur du code
6- Décalage de l'époque (T0)
0- Intervalle (T1)
60
An eight-digit one-minute interval
Use the public RFC test secret with 8 digits and a 60-second interval. The current answer changes with time; never use this published secret for an account.
Entrée
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
8 digits · 60-second period
Matches native HMAC for the current counter window.- Nom
RFC6238-public-test- Longueur du code
8- Décalage de l'époque (T0)
0- Intervalle (T1)
60
A custom seven-digit interval
Use the public RFC test secret with 7 digits and a 45-second interval. The current answer changes with time; never use this published secret for an account.
Entrée
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
7 digits · 45-second period
Matches native HMAC for the current counter window.- Nom
RFC6238-public-test- Longueur du code
7- Décalage de l'époque (T0)
0- Intervalle (T1)
45
Generate TOTP
Entrée
JBSWY3DPEHPK3PXPExpected checks
Matches /^URI: otpauth:\/\/totp\/Account\?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&period=30\n\nPassword: \d{6}$/- Nom
Account- Longueur du code
6- Décalage de l'époque (T0)
0- Intervalle (T1)
30
invalid base32 secret rejected
Entrée
not,valid|base32;inputExpected rejection
Message containsInvalid secret. The input must be a valid base32 string (characters A–Z and 2–7).- Nom
Account- Longueur du code
6- Décalage de l'époque (T0)
0- Intervalle (T1)
30
Paramètres
| Paramètre | Valeur par défaut | Entrée et choix |
|---|---|---|
| Nom | "Account" | Obligatoire |
| Longueur du code | 6 | Minimum: 6. Maximum: 8. Entier |
| Décalage de l'époque (T0) | 0 | Minimum: 0. Entier |
| Intervalle (T1) | 30 | Minimum: 1. Entier |