summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md24
1 files changed, 23 insertions, 1 deletions
diff --git a/README.md b/README.md
index fef620a..ac3bca9 100644
--- a/README.md
+++ b/README.md
@@ -57,10 +57,32 @@ one-time password it received, and must store the corresponding one-
57time password sequence number. The server must also facilitate the 57time password sequence number. The server must also facilitate the
58changing of the user's secret pass-phrase in a secure manner." 58changing 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
61with a seed received from the server as part of the challenge,
62through multiple iterations of a secure hash function to produce a
63one-time password. After each successful authentication, the number
64of secure hash function iterations is reduced by one. Thus, a unique
65sequence of passwords is generated. The server verifies the one-time
66password received from the generator by computing the secure hash
67function once and comparing the result with the previously accepted
68one-time password."
69
60 70
61## Examples 71## Examples
62 72
63TODO 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