diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 24 |
1 files changed, 23 insertions, 1 deletions
| @@ -57,10 +57,32 @@ one-time password it received, and must store the corresponding one- | |||
| 57 | time password sequence number. The server must also facilitate the | 57 | time password sequence number. The server must also facilitate the |
| 58 | changing of the user's secret pass-phrase in a secure manner." | 58 | changing of the user's secret pass-phrase in a secure manner." |
| 59 | 59 | ||
| 60 | "The OTP system generator passes the user's secret pass-phrase, along | ||
| 61 | with a seed received from the server as part of the challenge, | ||
| 62 | through multiple iterations of a secure hash function to produce a | ||
| 63 | one-time password. After each successful authentication, the number | ||
| 64 | of secure hash function iterations is reduced by one. Thus, a unique | ||
| 65 | sequence of passwords is generated. The server verifies the one-time | ||
| 66 | password received from the generator by computing the secure hash | ||
| 67 | function once and comparing the result with the previously accepted | ||
| 68 | one-time password." | ||
| 69 | |||
| 60 | 70 | ||
| 61 | ## Examples | 71 | ## Examples |
| 62 | 72 | ||
| 63 | TODO | 73 | ```python |
| 74 | import getpass | ||
| 75 | |||
| 76 | import otp2289 | ||
| 77 | |||
| 78 | # create a generator object | ||
| 79 | passwd_bytes = getpass.getpass().encode() # Type: This is a test. | ||
| 80 | generator = otp2289.generator.OTPGenerator(passwd_bytes, | ||
| 81 | 'TesT', | ||
| 82 | otp2289.OTP_ALGO_MD5) | ||
| 83 | generator.generate_otp_hexdigest(0) | ||
| 84 | generator.gen.generate_otp_words(0) | ||
| 85 | ``` | ||
| 64 | 86 | ||
| 65 | 87 | ||
| 66 | ## Author | 88 | ## Author |
