Exemple #1
0
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
Exemple #2
0
def encrypt_pass(password):
    """Encrypt a password with a salt using sha512_crypt and return the result."""
    return sha512_crypt.encrypt(password)