Initialize with the password

 @param [String] password
 @param [Integer] size
 @param [String] mode
331788
def encrypt(data, opts={})
      salt = generate_salt(opts[:salt])
      setup_cipher(:encrypt, salt)
      e = cipher.update(data) + cipher.final
      e = "Salted__#{salt}#{e}" #OpenSSL compatible
      opts[:binary] ? e : Base64.encode64(e)
    end
125655
def set_password(sender, **kwargs):
    
    if sender.model_class.__name__ == 'User':
        usr = kwargs['object']
        if not usr.password.startswith('$pbkdf2'):
            usr.set_password(usr.password)
            usr.save()
542200
async def set_password(self, password):
        
        await self.controller.change_user_password(self.username, password)
        self._user_info.password = password
1374505
function lm_init() {
		var j;

		// Initialize the hash table. */
		for (j = 0; j < HASH_SIZE; j++) {
			// head2(j, NIL);
			prev[WSIZE + j] = 0;
		}
		// prev will be initialized on the fly */

		// Set the default configuration parameters:
		max_lazy_match = configuration_table[compr_level].max_lazy;
		good_match = configuration_table[compr_level].good_length;
		if (!FULL_SEARCH) {
			nice_match = configuration_table[compr_level].nice_length;
		}
		max_chain_length = configuration_table[compr_level].max_chain;

		strstart = 0;
		block_start = 0;

		lookahead = read_buff(window, 0, 2 * WSIZE);
		if (lookahead <= 0) {
			eofile = true;
			lookahead = 0;
			return;
		}
		eofile = false;
		// Make sure that we always have enough lookahead. This is important
		// if input comes from a device such as a tty.
		while (lookahead < MIN_LOOKAHEAD && !eofile) {
			fill_window();
		}

		// If lookahead < MIN_MATCH, ins_h is garbage, but this is
		// not important since only literal bytes will be emitted.
		ins_h = 0;
		for (j = 0; j < MIN_MATCH - 1; j++) {
			// UPDATE_HASH(ins_h, window[j]);
			ins_h = ((ins_h << H_SHIFT) ^ (window[j] & 0xff)) & HASH_MASK;
		}
	}
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)
536436
public void setSize(UnsignedInteger64 size) {
		this.size = size;

		// Set the flag
		if (size != null) {
			flags |= SSH_FILEXFER_ATTR_SIZE;
		} else {
			flags ^= SSH_FILEXFER_ATTR_SIZE;
		}
	}
286874
@Override
    public final void initialize(JsRecoveryMessagingEngine recoveryME, String mode)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "initialize", new Object[] { recoveryME, mode });
        this._messagingEngine = recoveryME;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "initialize", "Assigned new recoverME to messages store");

    }
984862
private void initializePasswordRepetitionEditText() {
        passwordRepetitionEditText = (EditText) findViewById(R.id.password_repetition_edit_text);
        passwordRepetitionEditText.addValidator(
                Validators.equal(this, R.string.equal_validator_error_message, passwordEditText));
    }
807022
def setpassword(self, password):
        
        self._password = password
        if self._file_parser:
            if self._file_parser.has_header_encryption():
                self._file_parser = None
        if not self._file_parser:
            self._parse()
        else:
            self._file_parser.setpassword(self._password)
463832
protected void initPasswordDigest() {
    if(saltGenerator == null) {
      saltGenerator = new Default16ByteSaltGenerator();
    }
    if (passwordEncryptor == null) {
      passwordEncryptor = new Sha512HashDigest();
    }
    if(customPasswordChecker == null) {
      customPasswordChecker = Collections.emptyList();
    }
    if(passwordManager == null) {
      passwordManager = new PasswordManager(passwordEncryptor, customPasswordChecker);
    }
  }
81378
def init(match)
    self.match = match
    match = match[0] if match.kind_of?(Array) && match.length == 1
    case match
    when String then    init_string match
    when Regexp then    init_regex match
    when Symbol then    init_rule match
    when PatternElementHash then      init_hash match
    when Array then     init_array match
    else                raise "invalid pattern type: #{match.inspect}"
    end
  end
1019592
def set_pin_mode pin, mode
			if ( @pin_modes >> ( pin - 1 )).odd?  && ( mode == :input  ) or
			   ( @pin_modes >> ( pin - 1 )).even? && ( mode == :output ) then

				mask = 0 + ( 1 << ( pin - 1 ))
				@pin_modes ^= mask
			end
		end
133881
def configure(options = {})
      dimentions = options.values_at(:height, :width).collect(&:to_i)
      begin
        @input.winsize = dimentions
      rescue TypeError
        @input.winsize = [*dimentions, 0, 0]
      end if dimentions.none?(&:zero?)
    end
467912
def login(user, password)
      @user = user
      @password = password

      response = call_remote(:login, [:username, user, :password, password])

      raise "Incorrect user name / password [#{response.fault}]" unless response.loginResponse

      result = response[:loginResponse][:result]
      @session_id = result[:sessionId]

      init_server(result[:serverUrl])

      response
    end
625499
private void initMode(Map<String, String> agentConfig) {
        String mode = agentConfig.get("mode");
        if (mode != null && !mode.equals("start") && !mode.equals("stop")) {
            throw new IllegalArgumentException("Invalid running mode '" + mode + "'. Must be either 'start' or 'stop'");
        }
        isStopMode = "stop".equals(mode);
    }
143849
def _encrypt_password(self, password):
        
        if self.encryption_mode.lower() == 'crypt':
            return self._crypt_password(password)
        elif self.encryption_mode.lower() == 'md5':
            return self._md5_password(password)
        elif self.encryption_mode.lower() == 'md5-base':
            return self._md5_base_password(password)
        else:
            raise UnknownEncryptionMode(self.encryption_mode)
785230
public Ftp init(String host, int port, String user, String password) {
		return this.init(host,port,user,password,null);
	}