Skip to content

improve make-password for some real world rules #49

@terefang

Description

@terefang

hello

1a - discard the following characters as possible ambiguous looking 0O1lI8B5S2ZD

1b - or use the restricted symbol-set:

_PWCHARS = { '2','3','4','5','6','7','9','!','$','%','&','/','+','-','*',':',
            'a','b','c','d','e','f','g','h','j','k','m','n','p','q','r','t','u','v','w','x','y',
            'A', 'C', 'E','F','G','H','J','K','M','N','P','Q','R','T','U','V','W','X','Y' };

2 - although you shuffle those password characters around, it still could be that consecutive characters show up.

to avoid the above i would like to propose the following post processing:

  • check if p[n] == p[n+1] and do p[n]++
  • check if p[n] == p[n+1]+1 and do p[n]++ p[n+1]--

3 - allow the user to specify the allowed characters as a flag -symbol-set='...'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions