aesncast / pw-py

Command-Line Password Generator
GNU General Public License v3.0
0 stars 0 forks source link

Remove duplicate sequences on import #5

Open aesncast opened 2 years ago

aesncast commented 2 years ago

Consider the following:

# pwfile 1:
[good_password_1]
    init($key, $domain, $user)
    diceware_short()
    capitalize_some()
    add_some_simple_special_characters()
# pwfile 2:
[good_password_2]
    init($key, $domain, $user)
    diceware_short()
    capitalize_some()
    add_some_simple_special_characters()

After importing either pwfile, the resulting pwfile will have and use both good_password_1 and good_password_2. Since equality can be checked, perhaps clean up duplicates to only use a single instance of duplicate sequences after importing.

aesncast commented 2 years ago

Maybe also add a --cleanup-duplicates option to remove duplicates of the local pwfile, although I believe this should still happen automatically after an import. Consult the user for which name to use, but default to the local one (so nothing will change for the user).