Why Nostr? What is Njump?
2024-07-25 22:51:30
in reply to

0x10f on Nostr: When making a password generator a while ago, I noticed this algorithm doesn't give ...

When making a password generator a while ago, I noticed this algorithm doesn't give the correct distribution:
1) start the password with the characters it has to have (e.g. one digit)
2) fill the rest of the password randomly according to the requirements (e.g. digits and letters)
3) shuffle the password.

For example, if you need to generate a two-character password using only A and 1, with at least one 1, these should be equiprobable: A1, 1A, 11. But if you start with 1A or 11 and shuffle it, you'll end up with 11 half the time.
Author Public Key
npub1tp9nxg373mjkamr84qc8zg2f86eu2sqztrlnk22h38snhxs4y7lq04tyk4