Initialize() public method

public Initialize ( ) : void
return void
Exemplo n.º 1
0
        protected override void HashCore(byte[] b, int offset, int length)
        {
            while (length != 0)
            {
                totalBytesRead += length;

                if (length < missing)
                {
                    md4.TransformBlock(b, offset, length, null, 0);
                    missing -= length;
                    length   = 0;

                    if (missing % (5120 * 512) == 0)
                    {
                        FileHashingProgress(this, new FileHashingProgressArgs(totalBytesRead, size));
                    }
                }
                else
                {
                    md4.TransformFinalBlock(b, offset, missing);
                    md4HashBlocks.Add(md4.Hash);
                    md4.Initialize();

                    length -= missing;
                    offset += missing;
                    missing = BLOCKSIZE;
                }
            }
        }
Exemplo n.º 2
0
        public Ed2k()
        {
            md4HashBlocks = new List <byte[]>();
            md4           = new Md4();

            nullMd4Hash = md4.ComputeHash(nullArray);
            md4.Initialize();
        }
Exemplo n.º 3
0
        public Ed2k()
        {
            md4HashBlocks = new List<byte[]>();
            md4 = new Md4();

            nullMd4Hash = md4.ComputeHash(nullArray);
            md4.Initialize();
        }