Generate unique random alphanumeric characters that are 7 characters long

前端 未结 15 740
予麋鹿
予麋鹿 2020-12-09 00:32

It need not be meaningful words - more like random password generation, but the catch is - they should be unique. I will be using this for some kind of package / product cod

15条回答
  •  遥遥无期
    2020-12-09 01:22

    +1 to @Michael Haren's comment. If the passwords on your site should not have a constraint to be unique.

    If I try to use a given password and I get an error that I can't use it because it's already in use, then I know some user on the system has that password. If there are 1000 users I only need to try a max of 1000 other accounts before I find the one who has that password.

    Not really answering your question, but more than a comment. So I'm marking this CW.

提交回复
热议问题