• R/O
  • SSH

MakePW: Commit

The main repository. Contains both Python and Javascript implementations.


Commit MetaInfo

Revision8aa0e71678a01e56328ffceed31d0ebb502c3707 (tree)
Time2019-03-30 16:47:18
AuthorEric Hopper <hopper@omni...>
CommiterEric Hopper

Log Message

Fix XKCD format password generation in Python3.

Change Summary

Incremental Difference

diff -r 08390ed953e2 -r 8aa0e71678a0 makepw.py
--- a/makepw.py Sat Mar 30 00:47:03 2019 -0700
+++ b/makepw.py Sat Mar 30 00:47:18 2019 -0700
@@ -224,9 +224,9 @@
224224 wordlist = tuple(lstfile.read().split())
225225 lstfile.close()
226226
227- wordlist = tuple(w for w in wordlist if len(w) >= 3)
227+ wordlist = tuple(w.decode('utf-8') for w in wordlist if len(w) >= 3)
228228 randbigint = bytes_as_int(randbytes)
229- pw = ''
229+ pw = u''
230230 for i in range(0, numwords):
231231 pw += wordlist[randbigint % len(wordlist)].capitalize()
232232 randbigint //= len(wordlist)
Show on old repository browser