What is Nostr?
jared
npub1kun…wd3c
2024-10-09 02:33:16
in reply to nevent1q…4j03

jared on Nostr: Yes i solved a problem this way. I was trying to figure out how to generate a ...

Yes i solved a problem this way. I was trying to figure out how to generate a password that would always pass complexity requirements without reducing the entropy.

I woke up that night with the simple solution immediately top of mind…

just a loop that generates a random password, then tests it for complexity. If it doesn’t meet complexity requirements, loop again. If complexity test succeeds, return that as the generated password. (And a max loop count to avoid infinite loop conditions, of course.)
Author Public Key
npub1kunwwx7wtpfqzxq6e6yny6hy9pqxems8zw2ln0cjkc4k95zynv3s4kwd3c