Unlock this keyring by getting the password for the keyring from the
        user.
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")
1127427
def get(self):
        """"""
        args = self.get_parser.parse_args()
        cred = self.manager.get_credential(args)
        if cred is None:
            return abort(http_client.BAD_REQUEST,
                         message='Unable to decrypt credential value.')
        else:
            return cred
1053652
public Key getKey(String alias, String password) {
        try {
            return keyStore.getKey(alias, password.toCharArray());
        } catch (GeneralSecurityException e) {
            throw new IllegalStateException(e);
        }
    }
378209
public String decryptPassword(String encrypted) {
    Preconditions.checkArgument(this.encryptors.size() > 0,
        "A master password needs to be provided for decrypting passwords.");

    for (TextEncryptor encryptor : encryptors) {
      try {
        return encryptor.decrypt(encrypted);
      } catch (Exception e) {
        LOG.warn("Failed attempt to decrypt secret {}", encrypted, e);
      }
    }
    LOG.error("All {} decrypt attempt(s) failed.", encryptors.size());
    throw new RuntimeException("Failed to decrypt password ENC(" + encrypted + ")");
  }
1158629
Map getPassThruProps() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getPassThruProps");
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getPassThruProps", passThruProps);
        return passThruProps;
    }
973163
def _ask_password():
    """"""

    password = "Foo"
    password_trial = ""

    while password != password_trial:
        password = getpass.getpass()
        password_trial = getpass.getpass(prompt="Repeat:")
        if password != password_trial:
            print("\nPasswords do not match!")

    return password
68393
private float getPasswordStrength() {
        int absoluteScore = 0;
        CharSequence password = getView().getText();

        for (Constraint<CharSequence> constraint : constraints) {
            if (constraint.isSatisfied(password)) {
                absoluteScore++;
            }
        }

        return ((float) absoluteScore / (float) constraints.size());
    }
944737
def password_get(username=None):
    
    password = keyring.get_password('supernova', username)
    if password is None:
        split_username = tuple(username.split(':'))
        msg = ("Couldn't find a credential for {0}:{1}. You need to set one "
               "with: supernova-keyring -s {0} {1}").format(*split_username)
        raise LookupError(msg)
    else:
        return password.encode('ascii')
1057224
def get_password(from_stdin_only=False):
    
    if not sys.stdin.isatty():
        password = sys.stdin.readline().strip()
    elif not from_stdin_only:
        password = getpass.getpass('Enter the password: ')
    else:
        password = None

    return password
246348
def _get_passwordkey(self):
        """"""

        sha = SHA256.new()
        sha.update(self.password.encode('utf-8'))
        return sha.digest()
560595
public Key getKey() {
		if(key != null) {
			return key;
		} else if(keySpec != null && secretKeyFactory != null) {
			try {
				return key = secretKeyFactory.generateSecret(keySpec);
			} catch (InvalidKeySpecException e) {
				throw new RuntimeException(e);
			}
		}
		throw new IllegalStateException("Cannot produce key");
	}
863599
def unlock_password(name, root=None):
    '''
    
    '''
    pre_info = info(name, root=root)
    if not pre_info['name']:
        return False

    if not pre_info['passwd'].startswith('!'):
        return True

    cmd = ['passwd']

    if root is not None:
        cmd.extend(('-R', root))

    cmd.extend(('-u', name))

    __salt__['cmd.run'](cmd, python_shell=False)
    return not info(name, root=root)['passwd'].startswith('!')
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
51522
public synchronized void unlock()
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "unlock", this);

    // If the subscription locks are down to zero then notify the threads waiting
    // for the subscriptionTable lock.
    synchronized (iMutex)
    {
      if (readLockCount == 0)
      {
        if (tc.isEntryEnabled()) 
          SibTr.exit(tc, "unlock", "SIErrorException");
        
        SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0001",
          new Object[] {
            "com.ibm.ws.sib.processor.utils.AdvancedLockManager",
            "1:237:1.3" });
          
        throw new SIErrorException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0001",
            new Object[] {
              "com.ibm.ws.sib.processor.utils.AdvancedLockManager",
              "1:244:1.3" },
            null));
      }
      
      decrementThreadLockCount();
      // Decrement the lock count and notify the other threads if no 
      // one holds the lock any more.
      if (readLockCount == 0)
        notifyAll();        
    }

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "unlock");
  }
203027
def _load_password_from_keyring(self):
        
        try:
            keyring = __import__('keyring')
            return keyring.get_password(self.repository, self.username)
        except Exception:
            pass
1360970
public boolean unlock() throws IOException {
		if (lock != null) {
			lock.release();
			lock = null;
			return true;
		}
		return false;
	}
328050
def __password(self):
        """"""
        passwd = copy(self._inp_password.value)
        self._inp_password.value = ''
        return passwd