Set the keystore and password

@param keyStore Location of the Keystore on disk
@param keyPass Keystore password
491792
public void setKeyStore(String keyStore, String keyPass) 
    {
        setKeyStore(keyStore, keyPass, null, null);
    }
125505
public void setCredentials(String tenant, String username, String userpassword) {
        Credentials credentials = new Credentials(tenant, username, userpassword);
        restClient.setCredentials(credentials);
    }
981567
public ParallelTaskBuilder setSshPassword(String password) {
        this.sshMeta.setPassword(password);
        this.sshMeta.setSshLoginType(SshLoginType.PASSWORD);
        return this;
    }
500511
public void setPassword(String value) {

        try {
            OpenCms.getPasswordHandler().validatePassword(value);
        } catch (CmsSecurityException e) {
            throw new CmsIllegalArgumentException(e.getMessageContainer());
        }
        m_password = value;
    }
853558
public void setTrustStore(String trustStore, String trustPass) {
        setTrustStore(trustStore, trustPass, null, null);
    }
879321
public void setTrustStore(String pathToTrustStore, String trustStorePassword) {
        File tsFD = new File(pathToTrustStore != null && !pathToTrustStore.trim().isEmpty() ? pathToTrustStore : "");
        if (!tsFD.exists() || !tsFD.isFile() || !tsFD.canRead()) {
            throw new IllegalArgumentException("Trust store " + pathToTrustStore + " is not a read accessible file");
        }
        m_sslConfig = new SSLConfiguration.SslConfig(null, null, pathToTrustStore, trustStorePassword);
    }
946584
function(password, keyFile) {
    var that = this;
    this.ready = Promise.all([
        this.setPassword(password),
        this.setKeyFile(keyFile)
    ]).then(function() {
        return that;
    });
}
529268
public static void init(InputStream keyStoreStream, String keyStorePass, String entryName, String entryProtectionParam) {
		if (bypassSecurity) {
			return;
		}

		try {
			KeyStore ks = KeyStore.getInstance("JCEKS");
			ks.load(keyStoreStream, keyStorePass.toCharArray());

			KeyStore.SecretKeyEntry entry = (KeyStore.SecretKeyEntry) ks.getEntry(entryName,
				new KeyStore.PasswordProtection(entryProtectionParam.toCharArray()));
			SecretKey key = entry.getSecretKey();

			enCipher = Cipher.getInstance(key.getAlgorithm());
			enCipher.init(Cipher.ENCRYPT_MODE, key);

			deCipher = Cipher.getInstance(key.getAlgorithm());
			deCipher.init(Cipher.DECRYPT_MODE, key);

			keyStoreStream.close();
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
529188
public static PrivateKey loadPrivateKeyFromKeyStore(KeyStore keyStore,String alias,String keyPass){
        try {			
        	return (PrivateKey) keyStore.getKey(alias, keyPass.toCharArray());
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
    }
439964
public KeyStoreCredentialResolverBuilder addKeyPasswords(Map<String, String> keyPasswords) {
        requireNonNull(keyPasswords, "keyPasswords");
        keyPasswords.forEach(this::addKeyPassword);
        return this;
    }
361471
def set_password(self, service, username, password):
        
        service = escape_for_ini(service)
        username = escape_for_ini(username)

        # ensure the file exists
        self._ensure_file_path()

        # load the keyring from the disk
        config = configparser.RawConfigParser()
        config.read(self.file_path)

        # update the keyring with the password
        if not config.has_section(service):
            config.add_section(service)
        config.set(service, username, password)

        # save the keyring back to the file
        config_file = codecs.open(self.file_path, 'w', 'utf-8')
        try:
            config.write(config_file)
        finally:
            config_file.close()
415916
public TLSBuilder withTrustStore(final String trustStoreType, final InputStream trustStoreStream, final char[] trustStorePassword)
    {
        return withKeyStore(trustStoreType, trustStoreStream, trustStorePassword);
    }
1268702
func (s *UpdateCustomKeyStoreInput) SetKeyStorePassword(v string) *UpdateCustomKeyStoreInput {
	s.KeyStorePassword = &v
	return s
}
1261245
public void setPassword(CharSequence password) {

        LettuceAssert.notNull(password, "Password must not be null");
        this.password = password.toString().toCharArray();
    }
59650
public final String encodeKeyStore(KeyStore keyStore, char[] password) {
        logger.entry();
        try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
            keyStore.store(out, password);
            out.flush();
            byte[] bytes = out.toByteArray();
            String encodedKeyStore = Base64Utils.encode(bytes);
            logger.exit();
            return encodedKeyStore;
        } catch (IOException | KeyStoreException | NoSuchAlgorithmException | CertificateException e) {
            RuntimeException exception = new RuntimeException("An unexpected exception occurred while attempting to encode a keystore.", e);
            logger.error(exception.toString());
            throw exception;
        }
    }
394851
public static void setPassword(final String password) {
        if (password == null) {
            throw new AuthenticationException("Password can not be null");
        }

        if (!password.equals(Twilio.password)) {
            Twilio.invalidate();
        }

        Twilio.password = password;
    }
544845
def set(self, key, value, glob=False):
        """"""
        ns = self.namespace(key, glob)
        self.keyring.set_password(ns, key, value)