예제 #1
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()));
        }
예제 #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()));
        }