Exemplo n.º 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()));
        }
Exemplo n.º 2
0
        public int GetRealNumber(EncryptedData data)
        {
            PushCodecDecorator    push = new PushCodecDecorator(data, -3);
            SwapCodecDecorator    swap = new SwapCodecDecorator(push);
            FrameDecodecDecorator fd   = new FrameDecodecDecorator(swap, 2);

            push = new PushCodecDecorator(fd, -3);

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