// SetPassphrase sets the Passphrase field's value.
322435
func (s *ExportCertificateInput) SetPassphrase(v []byte) *ExportCertificateInput {
	s.Passphrase = v
	return s
}
385966
func (s *RestoreDBInstanceFromS3Input) SetMasterUserPassword(v string) *RestoreDBInstanceFromS3Input {
	s.MasterUserPassword = &v
	return s
}
103341
func (s *ModifyClusterInput) SetMasterUserPassword(v string) *ModifyClusterInput {
	s.MasterUserPassword = &v
	return s
}
663808
func (s *CreateClusterInput) SetMasterUserPassword(v string) *CreateClusterInput {
	s.MasterUserPassword = &v
	return s
}
288379
func SetPassword(file, name, password string, hashAlgorithm HashAlgorithm) error {
	_, err := os.Stat(file)
	passwords := HashedPasswords(map[string]string{})
	if err == nil {
		passwords, err = ParseHtpasswdFile(file)
		if err != nil {
			return err
		}
	}
	err = passwords.SetPassword(name, password, hashAlgorithm)
	if err != nil {
		return err
	}
	return passwords.WriteToFile(file)
}
149128
func (s *Service) SetPassword(ctx context.Context, name string, password string) error {
	if len(password) < MinPasswordLength {
		return EShortPassword
	}

	u, err := s.FindUser(ctx, platform.UserFilter{Name: &name})
	if err != nil {
		return EIncorrectPassword
	}
	hash, err := bcrypt.GenerateFromPassword([]byte(password), HashCost)
	if err != nil {
		return err
	}

	s.basicAuthKV.Store(u.ID.String(), hash)

	return nil
}
1060057
func (s *EnableSsoInput) SetPassword(v string) *EnableSsoInput {
	s.Password = &v
	return s
}
181062
func (c *Client) SetPassword(username, password string) error {
	if !names.IsValidUser(username) {
		return errors.Errorf("%q is not a valid username", username)
	}
	tag := names.NewUserTag(username)
	args := params.EntityPasswords{
		Changes: []params.EntityPassword{{
			Tag:      tag.String(),
			Password: password}},
	}
	var results params.ErrorResults
	err := c.facade.FacadeCall("SetPassword", args, &results)
	if err != nil {
		return err
	}
	return results.OneError()
}
763887
func (s *MongoDbSettings) SetPassword(v string) *MongoDbSettings {
	s.Password = &v
	return s
}
1161801
func (s *GetClusterCredentialsOutput) SetDbPassword(v string) *GetClusterCredentialsOutput {
	s.DbPassword = &v
	return s
}
794848
func (s *SkillDetails) SetInvocationPhrase(v string) *SkillDetails {
	s.InvocationPhrase = &v
	return s
}
684664
func (s *UpdateUserRequest) SetPassword(v string) *UpdateUserRequest {
	s.Password = &v
	return s
}
541244
func (m *Machine) SetPassword(password string) error {
	if len(password) < utils.MinAgentPasswordLength {
		return errors.Errorf("password is only %d bytes long, and is not a valid Agent password", len(password))
	}
	passwordHash := utils.AgentPasswordHash(password)
	op := m.UpdateOperation()
	op.PasswordHash = &passwordHash
	if err := m.st.ApplyOperation(op); err != nil {
		return errors.Trace(err)
	}
	m.doc.PasswordHash = passwordHash
	return nil
}
1341190
func (facade *connFacade) SetPassword(entity names.Tag, password string) error {
	var results params.ErrorResults
	args := params.EntityPasswords{
		Changes: []params.EntityPassword{{
			Tag:      entity.String(),
			Password: password,
		}},
	}
	err := facade.caller.FacadeCall("SetPasswords", args, &results)
	if err != nil {
		return errors.Trace(err)
	}
	if len(results.Results) != 1 {
		return errors.Errorf("expected 1 result, got %d", len(results.Results))
	}
	if err := results.Results[0].Error; err != nil {
		if params.IsCodeDead(err) {
			return ErrDenied
		} else if params.IsCodeNotFoundOrCodeUnauthorized(err) {
			return ErrDenied
		}
		return errors.Trace(err)
	}
	return nil
}
334410
func (s *InstanceAccessDetails) SetPassword(v string) *InstanceAccessDetails {
	s.Password = &v
	return s
}
817912
func (s *Store) ChangePassphrase(new []byte) error {
	s.mtx.Lock()
	defer s.mtx.Unlock()

	if s.flags.watchingOnly {
		return ErrWatchingOnly
	}

	if s.isLocked() {
		return ErrLocked
	}

	oldkey := s.secret
	newkey := kdf(new, &s.kdfParams)

	for _, wa := range s.addrMap {
		// Only btcAddresses curently have private keys.
		a, ok := wa.(*btcAddress)
		if !ok {
			continue
		}

		if err := a.changeEncryptionKey(oldkey, newkey); err != nil {
			return err
		}
	}

	// zero old secrets.
	zero(s.passphrase)
	zero(s.secret)

	// Save new secrets.
	s.passphrase = new
	s.secret = newkey

	return nil
}
565249
func (s *ConnectDirectoryInput) SetPassword(v string) *ConnectDirectoryInput {
	s.Password = &v
	return s
}