Creating good random passwords

This section will illustrate how to create good random passwords in Go, in order to protect the security of your Unix machines. The main reason for including it here instead of another chapter is because the presented Go program will use the /dev/random device, which is a file defined by your Unix system, for getting the seed of the random number generator. The name of the Go program will be goodPass.go, and it will require just one optional parameter, which will be the length of the generated password: the default size of the generated password will be 10 characters. Additionally, the program will generate ASCII characters starting from ! up to z. The ASCII code of the exclamation mark is 33, whereas the ASCII ...

Get Go Systems Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.