Exemple #1
0
    def hash_password(self):
        """
        Generate the secure hash for the password.

        :return:
        """
        if self.password:
            if sys.version_info[0] >= 3:
                self.password = bcrypt.generate_password_hash(self.password).decode('utf-8')
            else:
                self.password = bcrypt.generate_password_hash(self.password)
            return self.password
Exemple #2
0
    def hash_password(self):
        """
        Generate the secure hash for the password.

        :return:
        """
        if self.password:
            if sys.version_info[0] >= 3:
                self.password = bcrypt.generate_password_hash(
                    self.password).decode('utf-8')
            else:
                self.password = bcrypt.generate_password_hash(self.password)
            return self.password
Exemple #3
0
    def hash_password(self):
        """
        Generate the secure hash for the password.

        :return:
        """
        if self.password:
            self.password = bcrypt.generate_password_hash(self.password).decode('utf-8')
Exemple #4
0
    def hash_password(self):
        """
        Generate the secure hash for the password.

        :return:
        """
        self.password = bcrypt.generate_password_hash(self.password)
        return self.password
Exemple #5
0
    def hash_password(self):
        """
        Generate the secure hash for the password.

        :return:
        """
        self.password = bcrypt.generate_password_hash(self.password)
        return self.password