User Tools

Site Tools


notes:python_google_authenticator_generator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
notes:python_google_authenticator_generator [2013/04/02 12:10]
andy created
notes:python_google_authenticator_generator [2013/04/02 12:10]
andy
Line 7: Line 7:
 The secret key is a base-32 encoded string which the Python libraries require to be padded if it's not a multiple of 8 characters. To avoid this issue, the server should only generate keys that are such a multiple - I suggest the base-32 encoding of 10 random bytes, which should yield a 16-byte base-32 key. The secret key is a base-32 encoded string which the Python libraries require to be padded if it's not a multiple of 8 characters. To avoid this issue, the server should only generate keys that are such a multiple - I suggest the base-32 encoding of 10 random bytes, which should yield a 16-byte base-32 key.
  
-<​note>​The value returned by these functions is an `int`, which the Google applications zero-pad to 6 digits as required - bear this in mind if doing a string comparison.</​note>​+<​note>​The value returned by these functions is an ''​int''​, which the Google applications zero-pad to 6 digits as required - bear this in mind if doing a string comparison.</​note>​
  
 <code python google-generator.py>​ <code python google-generator.py>​
notes/python_google_authenticator_generator.txt ยท Last modified: 2013/04/02 12:32 by andy