packages/cafeteria/plugins/cordova-plugin-secure-storage/www/sjcl_ss.js
function (full) {
    var reseedData = [], strength = 0, i;

    this._nextReseed = reseedData[0] =
      (new Date()).valueOf() + this._MILLISECONDS_PER_RESEED;

    for (i=0; i<16; i++) {
      /* On some browsers, this is cryptographically random.  So we might
       * as well toss it in the pot and stir...
       */
      reseedData.push(Math.random()*0x100000000|0);
    }

    for (i=0; i<this._pools.length; i++) {
     reseedData = reseedData.concat(this._pools[i].finalize());
     strength += this._poolEntropy[i];
     this._poolEntropy[i] = 0;

     if (!full && (this._reseedCount & (1<<i))) { break; }
    }

    /* if we used the last pool, push a new one onto the stack */
    if (this._reseedCount >= 1 << this._pools.length) {
     this._pools.push(new sjcl.hash.sha256());
     this._poolEntropy.push(0);
    }

    /* how strong was this reseed? */
    this._poolStrength -= strength;
    if (strength > this._strength) {
      this._strength = strength;
    }

    this._reseedCount ++;
    this._reseed(reseedData);
  }
function (full) {
    var reseedData = [], strength = 0, i;

    this._nextReseed = reseedData[0] =
      (new Date()).valueOf() + this._MILLISECONDS_PER_RESEED;

    for (i=0; i<16; i++) {
      /* On some browsers, this is cryptographically random.  So we might
       * as well toss it in the pot and stir...
       */
      reseedData.push(Math.random()*0x100000000|0);
    }

    for (i=0; i<this._pools.length; i++) {
     reseedData = reseedData.concat(this._pools[i].finalize());
     strength += this._poolEntropy[i];
     this._poolEntropy[i] = 0;

     if (!full && (this._reseedCount & (1<<i))) { break; }
    }

    /* if we used the last pool, push a new one onto the stack */
    if (this._reseedCount >= 1 << this._pools.length) {
     this._pools.push(new sjcl.hash.sha256());
     this._poolEntropy.push(0);
    }

    /* how strong was this reseed? */
    this._poolStrength -= strength;
    if (strength > this._strength) {
      this._strength = strength;
    }

    this._reseedCount ++;
    this._reseed(reseedData);
  }
function ( full ) { var reseedData = [ ] , strength = 0 , i ; this . _nextReseed = reseedData [ 0 ] = ( new Date ( ) ) . valueOf ( ) + this . _MILLISECONDS_PER_RESEED ; for ( i = 0 ; i < 16 ; i ++ ) { /* On some browsers, this is cryptographically random.  So we might
       * as well toss it in the pot and stir...
       */ reseedData . push ( Math . random ( ) * 0x100000000 | 0 ) ; } for ( i = 0 ; i < this . _pools . length ; i ++ ) { reseedData = reseedData . concat ( this . _pools [ i ] . finalize ( ) ) ; strength += this . _poolEntropy [ i ] ; this . _poolEntropy [ i ] = 0 ; if ( ! full && ( this . _reseedCount & ( 1 << i ) ) ) { break ; } } /* if we used the last pool, push a new one onto the stack */ if ( this . _reseedCount >= 1 << this . _pools . length ) { this . _pools . push ( new sjcl . hash . sha256 ( ) ) ; this . _poolEntropy . push ( 0 ) ; } /* how strong was this reseed? */ this . _poolStrength -= strength ; if ( strength > this . _strength ) { this . _strength = strength ; } this . _reseedCount ++ ; this . _reseed ( reseedData ) ; }
reseed the data from the entropy pools
@param full If set, use all the entropy pools in the reseed.
reseed the data from the entropy pools