Python crypt

From wikinotes

builtin to python, encrypts strings using the OS's crypt.c.
only available on unix-like systems.

import crypt

# use strongest available
crypt.crypt('password')

# use specific algorithm
crypt.crypt('password', crypt.mksalt(crypt.METHOD_SHA512))