code: protected PGPPrivateKey findPrivateKey(InputStream secretKey, final long keyId, String password) throws PGPException, IOException {
      LOGGER.trace("findPrivateKey(InputStream, long, String)");
      LOGGER.trace("Secret Key: {}, Key ID: {}, Password: {}", secretKey == null ? "not set" : "set", keyId, password == null ? "not set" : "********");
      return findPrivateKey(secretKey, password, new KeyFilter<PGPSecretKey>() {
        @Override
        public boolean accept(PGPSecretKey secretKey) {
          return secretKey.getKeyID() == keyId;
        }
      });
    }
docs: read a private key and unlock it with the given password
  
  @param secretKey
  the secret key stream
  @param keyId
  the required key id
  @param password
  the password to unlock the private key
  @return the applicable private key or null if none is found
  @throws PGPException
  @throws IOException