Updates the wallet passphrase

@param  string $old_passphrase The old pass phrase
@param  string $new_passphrase The new pass phrase
@return array
438865
public function changePassPhrase($old_passphrase, $new_passphrase)
    {
        $args = [
            (string)$old_passphrase,
            (string)$new_passphrase
        ];
        return null === $this->rpc->query("walletPassPhraseChange", $args);
    }
653945
public boolean setNewPassword(String oldPwd, String newPwd) {
    	boolean result = false;
    	if (this.protectionHash.equals(RtfProtection.generateHash(oldPwd))) {
    		this.protectionHash = RtfProtection.generateHash(newPwd);
    		result = true;
    	}
    	return result;
    }
956615
def _passphrase_callback(passphrase):
    '''
    
    '''
    def f(*args):
        return salt.utils.stringutils.to_bytes(passphrase)
    return f
303681
public function sign(string $passphrase): AbstractTransaction
    {
        $publicKey = PublicKey::fromPassphrase($passphrase);
        $this->transaction->asset['delegate']['publicKey'] = $publicKey->getHex();

        parent::sign($passphrase);

        return $this;
    }
1216676
public function changePassword($uid, $currpass, $newpass, $repeatnewpass, $captcha_response = null)
    {
        $return['error'] = true;
        $block_status = $this->isBlocked();

        if ($block_status == "verify") {
            if ($this->checkCaptcha($captcha_response) == false) {
                $return['message'] = $this->__lang("user_verify_failed");
                return $return;
            }
        }

        if ($block_status == "block") {
            $return['message'] = $this->__lang("user_blocked");

            return $return;
        }

        $validatePassword = $this->validatePassword($currpass);

        if ($validatePassword['error'] == 1) {
            $this->addAttempt();
            $return['message'] = $validatePassword['message'];

            return $return;
        }

        $validatePassword = $this->validatePassword($newpass);

        if ($validatePassword['error'] == 1) {
            $return['message'] = $validatePassword['message'];

            return $return;
        } elseif ($newpass !== $repeatnewpass) {
            $return['message'] = $this->__lang("newpassword_nomatch");

            return $return;
        }

        $zxcvbn = new Zxcvbn();

        if ($zxcvbn->passwordStrength($newpass)['score'] < intval($this->config->password_min_score)) {
            $return['message'] = $this->__lang('password_weak');

            return $return;
        }

        $user = $this->getBaseUser($uid);

        if (!$user) {
            $this->addAttempt();
            $return['message'] = $this->__lang("system_error") . " #13";

            return $return;
        }

        if (!password_verify($currpass, $user['password'])) {
            $this->addAttempt();
            $return['message'] = $this->__lang("password_incorrect");

            return $return;
        }

        $newpass = $this->getHash($newpass);

        $query = "UPDATE {$this->config->table_users} SET password = ? WHERE id = ?";
        $query_prepared = $this->dbh->prepare($query);
        $query_prepared->execute([$newpass, $uid]);

        $return['error'] = false;
        $return['message'] = $this->__lang("password_changed");

        return $return;
    }
164781
def change_password!(new_master_password)
      self.class.password_policy.validate!(new_master_password)

      @backend.transaction{
        # Decrypt each key and value with the old master password and encrypt them with the new master password
        copy = {}
        @backend[:user].each{|k,v|
          # No need to (de)serialize - the value comes in as JSON and goes out as JSON
          new_key = Encryptor.encrypt(decrypt(k), :key => new_master_password)
          new_val = Encryptor.encrypt(decrypt(v), :key => new_master_password)
          copy[new_key] = new_val
        }

        # re-write user branch with newly encrypted keys and values
        @backend[:user] = copy

        # from now on, use the new master password as long as the object lives
        @master_password = new_master_password

        timestamp!(:last_modified)
        @backend[:system][:salt] = encrypt(Random.rand.to_s)
      }
    end
1287168
public static function replaceTheGivenKeyFor($products, $oldKey, $newKey) : array
	{
		return $products->mapWithKeys(function ($item) use ($oldKey, $newKey) {

			$features = $item->features;

			$features[$newKey] = $features[$oldKey];
			unset($features[$oldKey]);

			return [$item->id => $features];
		})->all();
	}
151734
function changePassword(masterPassword, newPassword1, newPassword2) {
    if (newPassword1 !== newPassword2) throw new Error("New passwords must match.");
    else {
        var contents = getContents(masterPassword);
        init(newPassword1, contents);
    }
}
550270
public function replace(string $old, string $new)
    {
        if ($old === $new) {
            return;
        }
        $this->tokenize();
        $i = array_search($old, $this->tokens);
        if ($i !== false) {
            $j = array_search($new, $this->tokens);
            if ($j === false) {
                $this->tokens[$i] = $new;
            } else {
                array_splice($this->tokens, $i, 1);
            }
            $this->setAttributeValue();
        }
    }
1297097
func oldPasswordUpgrade(pass string) (string, error) {
	hash1, err := hex.DecodeString(pass)
	if err != nil {
		return "", errors.Trace(err)
	}

	hash2 := auth.Sha1Hash(hash1)
	newpass := fmt.Sprintf("*%X", hash2)
	return newpass, nil
}
893240
protected static function changePasswordBySecurityAnswerWithUsername($username, $answer, $newPassword, $login)
    {
        return static::changePasswordBySecurityAnswer(
            static::getEmailByUsername($username),
            $answer,
            $newPassword,
            $login
        );
    }
219481
def update_pass(user_id, newpass):
        '''
        
        '''

        out_dic = {'success': False, 'code': '00'}

        entry = TabMember.update(user_pass=tools.md5(newpass)).where(TabMember.uid == user_id)
        entry.execute()

        out_dic['success'] = True

        return out_dic
138677
public function passwordChange($newPassword, $userID = null)
    {
        $hash = null;
        if (empty($userID)) {
            $userID = $this->getUserID();
        }
        if (!empty($userID)) {
            $hash = $this->encryptPassword($newPassword);

            $this->kontakt->insertToFlexiBee([
                'id' => $userID,
                'username' => $this->getUserLogin(),
                'password' => $hash,
//    'password@hash' => 'sha256',
//    'password@salt' => 'osoleno',
            ]);
            if ($this->kontakt->lastResponseCode == 201) {
                $this->kontakt->addStatusMessage('Password set', 'success');
                $this->kontakt->loadFromFlexiBee();
            } else {
                $hash = null;
                $this->kontakt->addStatusMessage('Password set failed',
                    'warning');
            }

            $this->addToLog('PasswordChange: '.$this->getDataValue($this->loginColumn).'@'.$userID.'#'.$this->getDataValue($this->myIDSColumn).' '.$hash);
            if ($userID == $this->getUserID()) {
                $this->setDataValue($this->passwordColumn, $hash);
            }
        }

        return $hash;
    }
120433
func (w *Wallet) ChangePassphrases(publicOld, publicNew, privateOld,
	privateNew []byte) error {

	err := make(chan error, 1)
	w.changePassphrases <- changePassphrasesRequest{
		publicOld:  publicOld,
		publicNew:  publicNew,
		privateOld: privateOld,
		privateNew: privateNew,
		err:        err,
	}
	return <-err
}
963101
public static function changePasswordByCode($email, $code, $newPassword, $login = true)
    {
        if (empty($email)) {
            throw new BadRequestException("Missing required email for password reset confirmation.");
        }

        if (empty($newPassword)) {
            throw new BadRequestException("Missing new password for reset.");
        }

        if (empty($code) || 'y' == $code) {
            throw new BadRequestException("Invalid confirmation code.");
        }

        /** @var User $user */
        $user = User::whereEmail($email)->whereConfirmCode($code)->first();

        if (null === $user) {
            // bad code
            throw new NotFoundException("The supplied email and/or confirmation code were not found in the system.");
        } elseif ($user->isConfirmationExpired()) {
            throw new BadRequestException("Confirmation code expired.");
        }

        static::isAllowed($user);

        try {
            $user->confirm_code = 'y';
            $user->password = $newPassword;
            $user->save();
        } catch (\Exception $ex) {
            throw new InternalServerErrorException("Error processing password reset.\n{$ex->getMessage()}");
        }

        if ($login) {
            static::userLogin($email, $newPassword);

            return ['success' => true, 'session_token' => Session::getSessionToken()];
        }

        return ['success' => true];
    }
358355
public static function changePassword($username , $new_password)
	{
		self::setUser( $username , $new_password );
		self::log( 'changepwd' , $username );
		self::save();

		return true;
	}
78100
public static function changePasswordByCodeWithUsername($username, $code, $newPassword, $login)
    {
        return static::changePasswordByCode(static::getEmailByUsername($username), $code, $newPassword, $login);
    }