Пример #1
0
        public int GetRealNumber(EncryptedData data)
        {
            ReverseCodecDecorator reverse = new ReverseCodecDecorator(data);
            PushCodecDecorator    push    = new PushCodecDecorator(reverse, 3);
            FrameDecodecDecorator fd      = new FrameDecodecDecorator(push, 1);
            CezarCodecDecorator   cezar   = new CezarCodecDecorator(fd, -4);

            return(int.Parse(cezar.GetData()));
        }
Пример #2
0
        public int GetRealNumber(EncryptedData data)
        {
            SwapCodecDecorator    swap    = new SwapCodecDecorator(data);
            CezarCodecDecorator   cezar   = new CezarCodecDecorator(swap, 1);
            ReverseCodecDecorator reverse = new ReverseCodecDecorator(cezar);
            FrameDecodecDecorator fd      = new FrameDecodecDecorator(reverse, 2);

            return(int.Parse(fd.GetData()));
        }