I have to change local administrator passwords on machines. I don't want to store password in a database. I have to generate a password that I can find later to connect to the machine again. So I periodically generate a secret random string (stored in a database) and make a hash of it with the machine name. At this point I want to know how to generate a password from this hash (following current good practices) and I want to find the most secure way to do it.
So… I have to generate a password (in Python and following current good practices) from SHA-512. How can I do that? And what about security aspects concerning the password generation and the generated password?