7
2
I am making a customizable password generator.
But I (for some reason) thought it'd be better to let you guys do it.
Umm.. then?
You only get one integer. That will include all the information about the customization.
The first 4 bits (1,2,4,8) will be used for choosing which charsets will be used.
Each bit corresponds to:
1: Lowercase alphabet(qwertyuiopasdfghjklzxcvbnm
)
2: Uppercase alphabet(QWERTYUIOPASDFGHJKLZXCVBNM
)
4: Numbers(0123456789
)
8: Special chars(All printable characters except ones stated above and the space)
The length of the password will be shifted 4 bits. In other words, multiplied by 16.
Then generate the password with the charsets and the length.
Examples
175 (10*16 + 15 (1111)): a_U0!/h96%
9In other words, multiplied by 16. I don't think that's correct. Perhaps "floor division by 16"? – Conor O'Brien – 2017-05-06T03:42:59.000
2Does this mean newlines are allowed in the generated password? Seems a bit unusual for a password. – numbermaniac – 2017-05-06T05:06:21.443
2Randomly? All possible passwords equally likely? – Luis Mendo – 2017-05-06T11:03:25.880