Beispiel #1
0
        private void Compress()
        {
            ulong aa, bb, cc;

            ulong[] tmpBlock;

            aa = this.a;
            bb = this.b;
            cc = this.c;

            tmpBlock = this.block;

            this.RoundABC(tmpBlock[0], 5);
            this.RoundBCA(tmpBlock[1], 5);
            this.RoundCAB(tmpBlock[2], 5);
            this.RoundABC(tmpBlock[3], 5);
            this.RoundBCA(tmpBlock[4], 5);
            this.RoundCAB(tmpBlock[5], 5);
            this.RoundABC(tmpBlock[6], 5);
            this.RoundBCA(tmpBlock[7], 5);

            TigerHash.Schedule(tmpBlock);

            this.RoundCAB(tmpBlock[0], 7);
            this.RoundABC(tmpBlock[1], 7);
            this.RoundBCA(tmpBlock[2], 7);
            this.RoundCAB(tmpBlock[3], 7);
            this.RoundABC(tmpBlock[4], 7);
            this.RoundBCA(tmpBlock[5], 7);
            this.RoundCAB(tmpBlock[6], 7);
            this.RoundABC(tmpBlock[7], 7);

            TigerHash.Schedule(tmpBlock);

            this.RoundBCA(tmpBlock[0], 9);
            this.RoundCAB(tmpBlock[1], 9);
            this.RoundABC(tmpBlock[2], 9);
            this.RoundBCA(tmpBlock[3], 9);
            this.RoundCAB(tmpBlock[4], 9);
            this.RoundABC(tmpBlock[5], 9);
            this.RoundBCA(tmpBlock[6], 9);
            this.RoundCAB(tmpBlock[7], 9);

            this.a  = this.a ^ aa;
            this.b -= bb;
            this.c += cc;
        }