def set_password(self, password): self.password = bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt(flask.current_app.config['BCRYPT_LOG_ROUNDS'])).decode('utf-8')