示例#1
0
        // Token: 0x0600004B RID: 75 RVA: 0x00003910 File Offset: 0x00001F10
        private static uint Calculate(uint[] table, uint seed, uint xorValue, bool refIn, bool refOut, byte[] array, int offset, int count)
        {
            uint num = seed;

            for (int i = offset; i < offset + count; i++)
            {
                byte b = refIn ? CRC32CryptoProvider.Reflect8(array[i]) : array[i];
                num = (uint)((ulong)num ^ (ulong)((long)((long)b << 24)));
                byte b2 = (byte)(num >> 24);
                num = (num << 8 ^ table[(int)b2]);
            }
            if (refOut)
            {
                num = CRC32CryptoProvider.Reflect32(num);
            }
            return(num ^ xorValue);
        }
示例#2
0
 // Token: 0x06000047 RID: 71 RVA: 0x0000385C File Offset: 0x00001E5C
 protected override void HashCore(byte[] array, int ibStart, int cbSize)
 {
     this._hash = CRC32CryptoProvider.Calculate(this._cryptoTable, this._currentSeed, this._currentXor, this._currentRefIn, this._currentRefOut, array, ibStart, cbSize);
 }