JSJaCKeys.js
Summary
No overview generated for 'JSJaCKeys.js'
Class Summary
|
JSJaCKeys |
Reflects a set of sha1/md5 hash keys for securing sessions
|
function JSJaCKeys(func,oDbg) {
var seed = Math.random();
this._k = new Array();
this._k[0] = seed.toString();
if (oDbg)
this.oDbg = oDbg;
else {
this.oDbg = {};
this.oDbg.log = function() {};
}
if (func) {
for (var i=1; i<JSJAC_NKEYS; i++) {
this._k[i] = func(this._k[i-1]);
oDbg.log(i+": "+this._k[i],4);
}
}
this._indexAt = JSJAC_NKEYS-1;
this.getKey = function() {
return this._k[this._indexAt--];
};
this.lastKey = function() { return (this._indexAt == 0); };
this.size = function() { return this._k.length; };
this._getSuspendVars = function() {
return ('_k,_indexAt').split(',');
}
}
Documentation generated by
JSDoc on Thu May 26 01:28:50 2016