예제
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.
입력
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
Case-insensitiveContains "Password: 755224"
Contains "counter=0"- 이름
RFC4226-public-test- 코드 길이
6- 카운터
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.
입력
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
Case-insensitiveContains "Password: 287082"
Contains "counter=1"- 이름
RFC4226-public-test- 코드 길이
6- 카운터
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.
입력
GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQExpected checks
Case-insensitiveContains "Password: 520489"
Contains "counter=9"- 이름
RFC4226-public-test- 코드 길이
6- 카운터
9
Generate HOTP
입력
JBSWY3DPEHPK3PXPExpected answer
URI: otpauth://hotp/Account?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&counter=0
Password: 282760- 이름
Account- 코드 길이
6- 카운터
0
invalid base32 secret rejected
입력
not,valid|base32;inputExpected rejection
Message containsInvalid secret. The input must be a valid base32 string (characters A–Z and 2–7).- 이름
Account- 코드 길이
6- 카운터
0
special characters in name are URI-encoded
입력
JBSWY3DPEHPK3PXPExpected answer
URI: otpauth://hotp/user%40example.com?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&counter=0
Password: 282760- 이름
user@example.com- 코드 길이
6- 카운터
0
매개변수
| 매개변수 | 기본값 | 입력 및 선택 항목 |
|---|---|---|
| 이름 | "Account" | 필수 |
| 코드 길이 | 6 | 최솟값: 6. 최댓값: 8. 정수 |
| 카운터 | 0 | 최솟값: 0. 정수 |