//>>built
define("dojox/math/random/Secure",["dojo"],function(e){e.declare("dojox.math.random.Secure",null,{constructor:function(b,c){this.prng=b;for(var a=this.pool=Array(b.size),d=this.pptr=0,f=b.size;d<f;){var g=Math.floor(65536*Math.random());a[d++]=g>>>8;a[d++]=g&255}this.seedTime();c||(this.h=[e.connect(e.body(),"onclick",this,"seedTime"),e.connect(e.body(),"onkeypress",this,"seedTime")])},destroy:function(){this.h&&e.forEach(this.h,e.disconnect)},nextBytes:function(b){var c=this.state;if(!c){this.seedTime();
c=this.state=this.prng();c.init(this.pool);for(var a=this.pool,d=0,f=a.length;d<f;a[d++]=0);this.pptr=0}d=0;for(f=b.length;d<f;++d)b[d]=c.next()},seedTime:function(){this._seed_int((new Date).getTime())},_seed_int:function(b){var c=this.pool,a=this.pptr;c[a++]^=b&255;c[a++]^=b>>8&255;c[a++]^=b>>16&255;c[a++]^=b>>24&255;a>=this.prng.size&&(a-=this.prng.size);this.pptr=a}});return dojox.math.random.Secure});