def shadow_hash(crypt_salt=None, password=None, algorithm='sha512'):
 return salt.utils.pycrypto.gen_hash(crypt_salt, password, algorithm)

def shadow_hash ( crypt_salt = None , password = None , algorithm = 'sha512' ) : return salt . utils . pycrypto . gen_hash ( crypt_salt , password , algorithm )
generates a salted hash suitable for /etc/shadow .