CPCNG_GenSeedKeyLevel: function (seedRequest, level) {
var shifttable = null;
var hashtable = null;
if (level === 11) {
shifttable = System.Array.init([0, 3, 1, 3, 2, 1, 3, 1, 7, 5, 2, 0], System.Int32);
hashtable = System.Array.init([3811086022, 779654713, 3860170900, 22047479, 2313570538, 2822992298, 4053608244, 1228776820], System.UInt32);
} else if (level === 17) {
shifttable = System.Array.init([3, 1, 0, 2, 1, 2, 4, 2, 6, 7, 1, 5], System.Int32);
hashtable = System.Array.init([3791972489, 322518691, 3934590008, 4082187247, 2742691634, 2931484519, 344518645, 694470518], System.UInt32);
} else {
return 0;
}
var seed = System.Array.init([((seedRequest >>> 24) & 255), ((seedRequest >>> 16) & 255), ((seedRequest >>> 8) & 255), (seedRequest & 255)], System.Byte);
var n = (seed[System.Array.index(((3 - shifttable[System.Array.index(1, shifttable)]) | 0), seed)] ^ seed[System.Array.index(((3 - shifttable[System.Array.index(0, shifttable)]) | 0), seed)]) & 255;
var a = Program.GetBit(seed[System.Array.index(((3 - shifttable[System.Array.index(2, shifttable)]) | 0), seed)], shifttable[System.Array.index(6, shifttable)]);
var b = Program.GetBit(seed[System.Array.index(((3 - shifttable[System.Array.index(3, shifttable)]) | 0), seed)], shifttable[System.Array.index(7, shifttable)]);
var c = Program.GetBit(n, shifttable[System.Array.index(8, shifttable)]);
var index = (a << 2) | (b << 1) | c;
var x = (hashtable[System.Array.index(index, hashtable)] ^ seedRequest) >>> 0;
a = Program.GetBit(seed[System.Array.index(((3 - shifttable[System.Array.index(4, shifttable)]) | 0), seed)], shifttable[System.Array.index(9, shifttable)]);
b = Program.GetBit(n, shifttable[System.Array.index(10, shifttable)]);
c = Program.GetBit(((x >>> (Bridge.Int.mul(8, shifttable[System.Array.index(5, shifttable)]))) & 255), shifttable[System.Array.index(11, shifttable)]);
index = (a << 2) | (b << 1) | c;
var y = ((hashtable[System.Array.index(index, hashtable)] >>> 8) | (((hashtable[System.Array.index(index, hashtable)] << 24) >>> 0))) >>> 0;
var key = (x ^ y) >>> 0;
return key;