AK.F1.Timing.Live.Encryption.LiveDecrypter.Decrypt C# (CSharp) Method

Decrypt() public method

public Decrypt ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void
        public void Decrypt(byte[] buffer, int offset, int count)
        {
            Guard.CheckBufferArgs(buffer, offset, count);

            if(_seed == 0)
            {
                return;
            }

            for(int i = offset, end = offset + count; i < end; ++i)
            {
                _mask = _mask >> 1 & 0x7FFFFFFF ^ ((_mask & 0x1) == 1 ? _seed : 0);
                buffer[i] = (byte)(buffer[i] ^ _mask & 0xFF);
            }
        }