Created
March 9, 2015 10:50
-
-
Save JosePedroDias/9e6c18cb9a753edc17bd to your computer and use it in GitHub Desktop.
random base32 string of length len. works well up to 6 characters. chars are in the range [0-9][a-t]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rndBase32(len) { | |
return ( ~~(Math.random() * Math.pow(32, len)) ).toString(32); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment