def create_pass(password): """Create a secure password hash using a salt and return the hash and salt.""" hashed_pass = sha512_crypt.encrypt(password) return hashed_pass
def encrypt_pass(password): """Encrypt a password with a salt using sha512_crypt and return the result.""" return sha512_crypt.encrypt(password)