dojox/math/random/prng4.js

  • Provides:

    • dojox.math.random.prng4
  • i

    • summary
  • j

    • summary
  • S

    • summary
  • dojox.math.random.prng4.size

    • summary
  • dojox.math.random.prng4

    • type
      Function
    • source: [view]
        return new Arcfour();
    • summary
  • Arcfour.init

    • type
      Function
    • parameters:
      • key: (typeof Array)
        an array of ints, each from [0..255]
    • source: [view]
         var i, j, t, S = this.S, len = key.length;
         for(i = 0; i < 256; ++i){
          S[i] = i;
         }
         j = 0;
         for(i = 0; i < 256; ++i){
          j = (j + S[i] + key[i % len]) & 255;
          t = S[i];
          S[i] = S[j];
          S[j] = t;
         }
         this.i = 0;
         this.j = 0;
    • summary
      Initialize arcfour context
  • Arcfour.i

    • summary
  • Arcfour.j

    • summary
  • Arcfour.next

    • type
      Function
    • source: [view]
         var t, i, j, S = this.S;
         this.i = i = (this.i + 1) & 255;
         this.j = j = (this.j + S[i]) & 255;
         t = S[i];
         S[i] = S[j];
         S[j] = t;
         return S[(t + S[i]) & 255];
    • summary
  • dojox.math.random

    • type
      Object
    • summary
  • dojox.math

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary