getBackupCode_() {
    var result = new e2e.async.Result();
    new e2e.ext.actions.Executor().execute(
        /** @type {!messages.ApiRequest} */ (
            {action: constants.Actions.GET_KEYRING_BACKUP_DATA}),
        this,
        /** @param {e2e.openpgp.KeyringBackupInfo} data */ function(data) {
          if (data.count % 2) {
            throw new e2e.error.InvalidArgumentsError('Odd number of keys');
          }

          // Limit of 256 key pairs since count is encoded as a single byte.
          if (data.count > 512) {
            throw new e2e.error.UnsupportedError('Too many keys');
          }

          var backup = goog.array.concat(
              constants.BACKUP_CODE_VERSION,
              // count / 2 since we store the number of key PAIRS
              [data.count / 2], data.seed);

          var sha1 = new goog.crypt.Sha1();
          sha1.update(backup);
          var checksum = sha1.digest().slice(0, 2);

          result.callback(goog.crypt.base64.encodeByteArray(
              goog.array.concat(backup, checksum)));
        });
    return result;
  }
Returns the backup code to display in the UI.
@private
@return {!e2e.async.Result.<string>} Base64 encoded backup code to display.