4 ms·
My version: https://gist.github.com/dchest/751fd00ee417c947c252 https://gist.github.com/dchest/751fd00ee417c947c252
by dchest 9y ago
My version: https://gist.github.com/dchest/751fd00ee417c947c252 https://gist.github.com/dchest/751fd00ee417c947c252
- dchest 9y ago(replying to myself as I can no longer edit:) My favorite feature in it is .entropy(n) method: when you want some fixed amount of unpredictable bits, but don't want to calculate how long the random string should be in your encoding to contain that many bits.