Unlocks the keychain

 @param [optional, String] password the password to unlock the keychain with. If no password is supplied the keychain will prompt the user for a password
553292
def unlock! password=nil
      if password
        password = password.encode(Encoding::UTF_8)
        status = Sec.SecKeychainUnlock self, password.bytesize, password, 1
      else
        status = Sec.SecKeychainUnlock self, 0, nil, 0
      end
      Sec.check_osstatus status
    end
389138
@NotNull
    @ObjectiveCName("validatePasswordCommand:")
    public Command<AuthState> validatePassword(String password) {
        return modules.getAuthModule().requestValidatePassword(password);
    }
664106
def check_password(password)
    return false unless key
    key == self.class.hash_password(password, key.split('|', 2).first)
  end
882788
def generate_password
      if(self.password.nil?)
        self.password = Digest::SHA1.hexdigest(self.username + self.enterprise_id)
      else
        self.password = Digest::SHA1.hexdigest(self.password + self.enterprise_id)
      end
    end
432787
public void assertPasswordCorrect(String password) {
		if (!isPasswordSet()) {
			throw new IllegalStateException("'" + updateConfigPasswordKey + "' is not set.");
		}

		if (!isPasswordCorrect(password)) {
			throw new IllegalStateException("Wrong password for '" + updateConfigPasswordKey + "'.");
		}
	}
500221
def password=(new_password)
    @password = new_password
    salt = self.class.random_salt
    self.key = new_password && self.class.hash_password(new_password, salt)
  end
1331769
def password_set(username=None, password=None):
    
    result = keyring.set_password('supernova', username, password)

    # NOTE: keyring returns None when the storage is successful.  That's weird.
    if result is None:
        return True
    else:
        return False
497863
public void setUserPassword(String userName, String password) {

        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.SetUserPassword);
        byte[] secret = null;
        if(password != null && ! password.isEmpty()){
            secret = ObfuscatUtil.base64Encode(password.getBytes());
        }
        SetUserPasswordProtocol p = new SetUserPasswordProtocol(userName, secret);

        connection.submitRequest(header, p, null);

    }
348064
def _unlock(self):
        
        self.keyring_key = getpass.getpass(
            'Please enter password for encrypted keyring: ')
        try:
            ref_pw = self.get_password('keyring-setting', 'password reference')
            assert ref_pw == 'password reference value'
        except AssertionError:
            self._lock()
            raise ValueError("Incorrect Password")
306269
def set_password(self, password):
        
        self.password = password
        self.changed_event.emit(self)
1195586
public void setUserPassword(String password) {
		try {
			getSipURI().setUserPassword(password);
		} catch (ParseException e) {
			logger.error("error setting parameter ", e);
			throw new IllegalArgumentException("Bad arg", e	);
		}
	}
37443
public void clearPassword() {
        char[] password = this.password;
        this.password = null;
        if (password != null) {
            Arrays.fill(password, (char) 0);
        }
    }
820958
def unlock(path, body, initheader = nil)
      request(Unlock.new(path, initheader), body)
    end
1196035
def password=(password)
      fail TypeError if password.nil?
      fail TypeError unless password.is_a? String
      fail ArgumentError if password.length > MAX_VTP_PASSWORD_SIZE
      Feature.vtp_enable
      state = (password == default_password) ? 'no' : ''
      config_set('vtp', 'password', state: state, password: password)
    end
678379
function (user, next) {
    if (!user.hasOwnProperty('password') || !user.password || this.isHashed(user.password)) {
      next(null, user);
    } else {
      bcrypt.hash(user.password, 10, function (err, hash) {
        user.password = hash;
        next(err, user);
      });
    }
  }
1156127
public static boolean validatePassword(String password, String goodHash) throws NoSuchAlgorithmException, InvalidKeySpecException {

    return validatePassword(password.toCharArray(), goodHash);
  }
638051
def unlock(self, password = None, keyfile = None, buf = None):
        

        if ((password is None or password == "") and (keyfile is None or
             keyfile == "")):
            raise KPError("A password/keyfile is needed")
        elif ((type(password) is not str and password is not None) or
              (type(keyfile) is not str and keyfile is not None)):
            raise KPError("password/keyfile must be a string.")
        if keyfile == "":
            keyfile = None
        if password == "":
            password = None
        self.password = password
        self.keyfile = keyfile
        return self.load(buf)