Skip to content
  • Sebastian Spaeth's avatar
    passphrase_generator: Simplify function · 04f3439d
    Sebastian Spaeth authored and David Heidelberg's avatar David Heidelberg committed
    Each word in our wordlist had a 6-digit number prefixed, and we were loading
    these into a dict, parsing the digits off using the regex module. We were
    then throwing 6 actual (digital) 6-sided dices to get a random number which
    was used to access a random word from our list. It could hardly be more
    complicated than that!
    
    Remove those numbers, just load the words in a plain list, create a random
    number between [0, len_words) and access the list directly by the index.
    
    This is not really performance-critical code, but we have a smaller
    ressource file, no need for the regex module and a smaller code base.
    
    This commit introduces no functional changes
    04f3439d