queryFunc = function() {
    if (goog.array.isEmpty(userIds)) {
      callback(keys);
    } else {
      var userId = goog.string.trim(userIds.pop());
      if (userId) {
        ctx.searchPublicKey(userId).addCallback(function(found) {
          if (found) {
            goog.array.extend(keys, found);
          }
          queryFunc();
        }).addErrback(errorCallback);
      }
    }
  }
Parses string and looks up keys for encrypting objects in keyring.
@param {!e2e.openpgp.ContextImpl} ctx A PGP context that can be used to
    complete the action.
@param {!Array.<string>} recipients A list of recipients to get keys for.
@param {function(!Array.<!e2e.openpgp.Key>)} callback The callback where the
     resulting array of key objects is to be passed.
@param {function(Error)} errorCallback A callback where errors will be
    passed to.
@private