Exemple #1
0
        public override int ReadByte()
        {
#if NO_CRYPT
            return(BasePullStream.ReadByte());
#else
            var encrypted = new byte[1];
            var value     = BasePullStream.ReadByte();
            if ((value < 0) || (value > 255))
            {
                throw new EndOfStreamException();
            }

            encrypted[0] = (byte)value;

            var buffer = new byte[1];
            Decrypt(encrypted, buffer, 1);

            return(buffer[0]);
#endif
        }