def encrypt(password, salt=None): return bcrypt.hashpw(password.encode('utf-8'), salt if salt else bcrypt.gensalt())