keyrings/cryptfile/file_base.py
def set_password(self, service, username, password):
        """Write the password in the file.
        """
        assoc = self._generate_assoc(service, username)
        # encrypt the password
        password_encrypted = self.encrypt(password.encode('utf-8'), assoc)
        # encode with base64 and add line break to untangle config file
        password_base64 = '\n' + encodebytes(password_encrypted).decode()

        self._write_config_value(service, username, password_base64)
def set_password(self, service, username, password):
        assoc = self._generate_assoc(service, username)
        # encrypt the password
        password_encrypted = self.encrypt(password.encode('utf-8'), assoc)
        # encode with base64 and add line break to untangle config file
        password_base64 = '\n' + encodebytes(password_encrypted).decode()

        self._write_config_value(service, username, password_base64)
def set_password ( self , service , username , password ) : assoc = self . _generate_assoc ( service , username ) # encrypt the password password_encrypted = self . encrypt ( password . encode ( 'utf-8' ) , assoc ) # encode with base64 and add line break to untangle config file password_base64 = '\n' + encodebytes ( password_encrypted ) . decode ( ) self . _write_config_value ( service , username , password_base64 )
Write the password in the file.
Write the password in the file .