Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Code golf: Password generator
- Constraints: 16characters, letters and numbers only
- Note: Just copy-paste the snippet below in your browser console, and it'll give you an alphanumerical 16-char password. This golf is actually quite readable imo.
- l = password length
- c = charset for the password
- 2019-01-04 : 139chr
- */
- l=16;c="abcdefgijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";for(i=0,n=c.length,s="";i<=l;i+=1){s+=c.charAt((Math.random()*n)|0)}
Add Comment
Please, Sign In to add comment