This method is used to set the password.

        password must be a string.
12679
def set_password(self, password = None):
        
        
        if password is None or type(password) is not str:
            raise KPError("Need a new image number")
        else:
            self.password = password
            self.last_mod = datetime.now().replace(microsecond=0)
            return True
666540
public Proxy setSocksPassword(String password) {
    verifyProxyTypeCompatibility(ProxyType.MANUAL);
    this.proxyType = ProxyType.MANUAL;
    this.socksPassword = password;
    return this;
  }
498010
@Override
    public void setPassword(String password) {
        room.setPassword(password);
        apiRoom.setPassword(password);
    }
917251
public function setPassword($password)
    {
      if(!is_string($password) && strlen(trim($password)) == 0)
        throw new InvalidArgumentException(__METHOD__ . '; Invalid password, must be a non empty string');

      $this->password = $password;
    }
171340
def set_password(self, raw_password):
        
        self.password = pbkdf2_sha512.encrypt(raw_password, rounds=10000,
                                              salt_size=10)
542200
async def set_password(self, password):
        
        await self.controller.change_user_password(self.username, password)
        self._user_info.password = password
642431
protected void updateText()
	{
		this.text.setLength(0);
		this.text.append(password.toString().replaceAll("(?s).", String.valueOf(passwordChar)));
		guiText.setText(text.toString());
	}
981567
public ParallelTaskBuilder setSshPassword(String password) {
        this.sshMeta.setPassword(password);
        this.sshMeta.setSshLoginType(SshLoginType.PASSWORD);
        return this;
    }
37443
public void clearPassword() {
        char[] password = this.password;
        this.password = null;
        if (password != null) {
            Arrays.fill(password, (char) 0);
        }
    }
306269
def set_password(self, password):
        
        self.password = password
        self.changed_event.emit(self)
1254180
def setNewPassword(self, url, username, password):
        
        self.br.add_password(url, username, password)
950280
public void setPassword(String password) {
        for (Authentication auth : authentications.values()) {
            if (auth instanceof HttpBasicAuth) {
                ((HttpBasicAuth) auth).setPassword(password);
                return;
            }
        }
        throw new RuntimeException("No HTTP basic authentication configured!");
    }
723453
def set_password_ibm(self, password_ibm):
        
        if self.get_mode() == "ibm":
            self.__password_ibm = password_ibm
        else:
            raise Exception(
                "Mode is {}, whereas it must be `ibm`".format(self.get_mode()))
429848
public void setBasicUsernamePassword(String username, String password) {
        this.username = username;
        this.password = password;
        LOG.debug("use basic username/password {}/********", username);

        userPassCredentialsProvider = new BasicCredentialsProvider();
        userPassCredentialsProvider.setCredentials(AuthScope.ANY,
            new UsernamePasswordCredentials(username, password));

        authCache = new BasicAuthCache();
        BasicScheme basicAuth = new BasicScheme();
        authCache.put(httpHost, basicAuth);
    }
71474
def set_password(self, service, username, password):
        
        # encrypt the password
        password_encrypted = _win_crypto.encrypt(password.encode('utf-8'))
        # encode with base64
        password_base64 = base64.encodestring(password_encrypted)
        # encode again to unicode
        password_saved = password_base64.decode('ascii')

        # store the password
        key_name = self._key_for_service(service)
        hkey = winreg.CreateKey(winreg.HKEY_CURRENT_USER, key_name)
        winreg.SetValueEx(hkey, username, 0, winreg.REG_SZ, password_saved)
1202311
def set_(key, value, service=None, profile=None):
    '''
    
    '''
    service = _get_service(service, profile)
    keyring.set_password(service, key, value)
98102
def set_password(cls, instance, raw_password):
        
        # support API for both passlib 1.x and 2.x
        hash_callable = getattr(
            instance.passwordmanager, "hash", instance.passwordmanager.encrypt
        )
        password = hash_callable(raw_password)
        if six.PY2:
            instance.user_password = password.decode("utf8")
        else:
            instance.user_password = password
        cls.regenerate_security_code(instance)