AniDBmini.HashAlgorithms.Md4.HashCore C# (CSharp) Method

HashCore() protected method

protected HashCore ( byte array, int ibStart, int cbSize ) : void
array byte
ibStart int
cbSize int
return void
        protected override void HashCore(byte[] array, int ibStart, int cbSize)
        {
            int n = (int)(hashedLength % BLOCKLENGTH);
            int partLen = BLOCKLENGTH - n;
            int i = 0;
            hashedLength += cbSize;

            if (cbSize >= partLen)
            {
                System.Buffer.BlockCopy(array, ibStart, buffer, n, partLen);
                TransformMd4Block(buffer, 0);
                i = partLen;
                while (i + BLOCKLENGTH - 1 < cbSize)
                {
                    TransformMd4Block(array, ibStart + i);
                    i += BLOCKLENGTH;
                }
                n = 0;
            }
            if (i < cbSize) System.Buffer.BlockCopy(array, ibStart + i, buffer, n, cbSize - i);
        }