better passwords
Wise folks know it is bad practice to use the same password across websites. Or, to use a password that can be cracked in a dictionary attack (pa33word
, anyone??)
So here’s a few quick ways to generate random character passwords from the terminal.
One quick way is with Ruby’s SecureRandom
class and an irb
terminal session:
Your machine may also have come with the OpenSSL library. This open-source library seems to be a veritable junk drawer of secure communication and encryption tools (meaning that it contains just about everything)
It would be easy to alias one of these and pass the desired length as a arg too:
Why is that length 12 password really longer than 12 characters?
fun fact!
each base64 digit represents exactly 6 bits of data which is a 4/3 conversion when compared to standard chars. Said another way, a base64 string with length of 12 which appear as a char string with a length approx 1.33 times longer.