Updated default password length to 6 (from 4)
authorSteven Tobin <steventtobin (at) gmail.com>
Wed, 2 Apr 2014 05:10:34 +0000 (16:10 +1100)
committerSteven Tobin <steventtobin (at) gmail.com>
Wed, 2 Apr 2014 05:10:34 +0000 (16:10 +1100)
Noting that Diceware creator Arnold Reinhold now recommends using 6
words in his (similar) system, update the defaults to 6 for our code as
well.

xkcd_password.py

index b7b29e1fe1a0a19122ab745f361992a177fcee10..45530b22587c5864784cc6733e0b40b61a1693d4 100755 (executable)
@@ -167,7 +167,7 @@ def find_acrostic(acrostic, wordlist):
 
 
 def generate_xkcdpassword(wordlist,
-                          n_words=4,
+                          n_words=6,
                           interactive=False,
                           acrostic=False,
                           delim=" "):
@@ -194,7 +194,7 @@ def generate_xkcdpassword(wordlist,
 
     # else, interactive session
     if not acrostic:
-        custom_n_words = raw_input("Enter number of words (default 4): ")
+        custom_n_words = raw_input("Enter number of words (default 6): ")
 
         if custom_n_words:
             n_words = int(custom_n_words)
@@ -230,7 +230,7 @@ if __name__ == '__main__':
                       default=9, type="int",
                       help="Maximum length of words to make password")
     parser.add_option("-n", "--numwords", dest="numwords",
-                      default=4, type="int",
+                      default=6, type="int",
                       help="Number of words to make password")
     parser.add_option("-i", "--interactive", dest="interactive",
                       default=False, action="store_true",
git clone https://git.99rst.org/PROJECT