function SingleGnubbySigner(
    gnubbyId, forEnroll, completeCb, timer, opt_logMsgUrl) {
  /** @private {GnubbyDeviceId} */
  this.gnubbyId_ = gnubbyId;
  /** @private {SingleGnubbySigner.State} */
  this.state_ = SingleGnubbySigner.State.INIT;
  /** @private {boolean} */
  this.forEnroll_ = forEnroll;
  /** @private {function(SingleSignerResult)} */
  this.completeCb_ = completeCb;
  /** @private {Countdown} */
  this.timer_ = timer;
  /** @private {string|undefined} */
  this.logMsgUrl_ = opt_logMsgUrl;

  /** @private {!Array<!DecodedSignHelperChallenge>} */
  this.challenges_ = [];
  /** @private {number} */
  this.challengeIndex_ = 0;
  /** @private {boolean} */
  this.challengesSet_ = false;

  /** @private {!Object<Array<number>, number>} */
  this.cachedError_ = [];

  /** @private {(function()|undefined)} */
  this.openCanceller_;
}
/**
 * Creates a new sign handler with a gnubby. This handler will perform a sign
 * operation using each challenge in an array of challenges until its success
 * condition is satisified, or an error or timeout occurs. The success condition
 * is defined differently depending whether this signer is used for enrolling
 * or for signing:
 *
 * For enroll, success is defined as each challenge yielding wrong data. This
 * means this gnubby is not currently enrolled for any of the appIds in any
 * challenge.
 *
 * For sign, success is defined as any challenge yielding ok.
 *
 * The complete callback is called only when the signer reaches success or
 * failure, i.e.  when there is no need for this signer to continue trying new
 * challenges.
 *
 * @param {GnubbyDeviceId} gnubbyId Which gnubby to open.
 * @param {boolean} forEnroll Whether this signer is signing for an attempted
 *     enroll operation.
 * @param {function(SingleSignerResult)}
 *     completeCb Called when this signer completes, i.e. no further results are
 *     possible.
 * @param {Countdown} timer An advisory timer, beyond whose expiration the
 *     signer will not attempt any new operations, assuming the caller is no
 *     longer interested in the outcome.
 * @param {string=} opt_logMsgUrl A URL to post log messages to.
 * @constructor
 */
Creates a new sign handler with a gnubby. This handler will perform a sign
operation using each challenge in an array of challenges until its success
condition is satisified, or an error or timeout occurs. The success condition
is defined differently depending whether this signer is used for enrolling
or for signing.

For enroll, success is defined as each challenge yielding wrong data. This
means this gnubby is not currently enrolled for any of the appIds in any
challenge.

For sign, success is defined as any challenge yielding ok.

The complete callback is called only when the signer reaches success or
failure, i.e.  when there is no need for this signer to continue trying new
challenges.

@param {GnubbyDeviceId} gnubbyId Which gnubby to open.
@param {boolean} forEnroll Whether this signer is signing for an attempted
enroll operation.
Creates a new sign handler with a gnubby . This handler will perform a sign operation using each challenge in an array of challenges until its success condition is satisified or an error or timeout occurs . The success condition is defined differently depending whether this signer is used for enrolling or for signing . For enroll success is defined as each challenge yielding wrong data . This means this gnubby is not currently enrolled for any of the appIds in any challenge . For sign success is defined as any challenge yielding ok . The complete callback is called only when the signer reaches success or failure i . e . when there is no need for this signer to continue trying new challenges . @param { GnubbyDeviceId } gnubbyId Which gnubby to open . @param { boolean } forEnroll Whether this signer is signing for an attempted enroll operation .
function SingleGnubbySigner(
    gnubbyId, forEnroll, completeCb, timer, opt_logMsgUrl) {
  this.gnubbyId_ = gnubbyId;
  this.state_ = SingleGnubbySigner.State.INIT;
  this.forEnroll_ = forEnroll;
  this.completeCb_ = completeCb;
  this.timer_ = timer;
  this.logMsgUrl_ = opt_logMsgUrl;
  this.challenges_ = [];
  this.challengeIndex_ = 0;
  this.challengesSet_ = false;
  this.cachedError_ = [];
  this.openCanceller_;
}
function SingleGnubbySigner ( gnubbyId , forEnroll , completeCb , timer , opt_logMsgUrl ) { this . gnubbyId_ = gnubbyId ; this . state_ = SingleGnubbySigner . State . INIT ; this . forEnroll_ = forEnroll ; this . completeCb_ = completeCb ; this . timer_ = timer ; this . logMsgUrl_ = opt_logMsgUrl ; this . challenges_ = [ ] ; this . challengeIndex_ = 0 ; this . challengesSet_ = false ; this . cachedError_ = [ ] ; this . openCanceller_ ; }
Creates a new sign handler with a gnubby.
Creates a new sign handler with a gnubby .
/** @private {GnubbyDeviceId} */ /** @private {SingleGnubbySigner.State} */ /** @private {boolean} */ /** @private {function(SingleSignerResult)} */ /** @private {Countdown} */ /** @private {string|undefined} */ /** @private {!Array<!DecodedSignHelperChallenge>} */ /** @private {number} */ /** @private {boolean} */ /** @private {!Object<Array<number>, number>} */ /** @private {(function()|undefined)} */