Beispiele
Reproduce three authenticator counter codes from the HOTP standard — step 1
Explain why counters produce different codes using published test keys, with no real authenticator secret.
Eingabe
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
Case-insensitiveContains "Password: 755224"
Contains "counter=0"- Name
RFC4226-public-test- Codelänge
6- Zähler
0
Reproduce three authenticator counter codes from the HOTP standard — step 2
Explain why counters produce different codes using published test keys, with no real authenticator secret.
Eingabe
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
Case-insensitiveContains "Password: 287082"
Contains "counter=1"- Name
RFC4226-public-test- Codelänge
6- Zähler
1
Reproduce three authenticator counter codes from the HOTP standard — step 3
Explain why counters produce different codes using published test keys, with no real authenticator secret.
Eingabe
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
Case-insensitiveContains "Password: 520489"
Contains "counter=9"- Name
RFC4226-public-test- Codelänge
6- Zähler
9
Generate HOTP
Eingabe
JBSWY3DPEHPK3PXPExpected answer
URI: otpauth://hotp/Account?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&counter=0
Password: 282760- Name
Account- Codelänge
6- Zähler
0
invalid base32 secret rejected
Eingabe
not,valid|base32;inputExpected rejection
Message containsInvalid secret. The input must be a valid base32 string (characters A–Z and 2–7).- Name
Account- Codelänge
6- Zähler
0
special characters in name are URI-encoded
Eingabe
JBSWY3DPEHPK3PXPExpected answer
URI: otpauth://hotp/user%40example.com?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&counter=0
Password: 282760- Name
user@example.com- Codelänge
6- Zähler
0
Parameter
| Parameter | Standardwert | Eingabe und Auswahl |
|---|---|---|
| Name | "Account" | Erforderlich |
| Codelänge | 6 | Minimum: 6. Maximum: 8. Ganzzahl |
| Zähler | 0 | Minimum: 0. Ganzzahl |