synapse/handlers/auth.py
def hash(self, password):
        """Computes a secure hash of password.

        Args:
            password (str): Password to hash.

        Returns:
            Deferred(str): Hashed password.
        """
        def _do_hash():
            return bcrypt.hashpw(password.encode('utf8') + self.hs.config.password_pepper,
                                 bcrypt.gensalt(self.bcrypt_rounds))

        return make_deferred_yieldable(threads.deferToThread(_do_hash))
Computes a secure hash of password.

        Args:
            password (str): Password to hash.

        Returns:
            Deferred(str): Hashed password.
        
Computes a secure hash of password.
Computes a secure hash of password .
def hash(self, password):
        def _do_hash():
            return bcrypt.hashpw(password.encode('utf8') + self.hs.config.password_pepper,
                                 bcrypt.gensalt(self.bcrypt_rounds))
        return make_deferred_yieldable(threads.deferToThread(_do_hash))
def hash ( self , password ) : def _do_hash ( ) : return bcrypt . hashpw ( password . encode ( 'utf8' ) + self . hs . config . password_pepper , bcrypt . gensalt ( self . bcrypt_rounds ) ) return make_deferred_yieldable ( threads . deferToThread ( _do_hash ) )
Computes a secure hash of password.
Computes a secure hash of password .
"""Computes a secure hash of password.

        Args:
            password (str): Password to hash.

        Returns:
            Deferred(str): Hashed password.
        """
None
Deferred(str)
self
password
Password to hash.
Password to hash .