@classmethod
    def encrypt_password(cls, plaintext_password):
        if plaintext_password:
            return bcrypt.generate_password_hash(plaintext_password, 8)

        return None
Hash a plaintext string using bcrypt.
dataset/ETHPy150Open nickjj/build-a-saas-app-with-flask/catwatch/blueprints/user/models.py/User.encrypt_password