Posted On: Feb 22, 2018
To generate crypto passwords for the user module, mkpasswd utility available in Linux systems is a great option.
However, if you’re OS X user and this utility is not installed on your system, you can still generate it using python. First check that Passlib passwo4rd hashing library is installed. Once the library is installed, SHA512 password values can then be generated as follows:
python -c "from passlib.hash import sha512_crypt; import getpass; print sha512_crypt.encrypt(getpass.getpass())"
To generate the hashed version of the password, use the hashing filters. Also, use vault to protect sensitive data.
Never Miss an Articles from us.