Ejemplo n.º 1
0
        private IEncryptor <PhotMetadata> GetCipher()
        {
            ChainEncryptor <string> codecChain = new ChainEncryptor <string>();

            codecChain.Join(new CezarStringCodec(4))
            .Join(new FrameStringCodec(1))                     //CezarCodec(n=4) -> FrameCodec(n=1) -> PushCodec(n=-3) -> ReverseCodec
            .Join(new PushStringCodec(-3))
            .Join(new ReverseStringCodec());

            return(new PhotMetadataDecoder(codecChain));
        }
Ejemplo n.º 2
0
        private IEncryptor <AttractionData> GetCipher()
        {
            ChainEncryptor <string> codecChain = new ChainEncryptor <string>();

            codecChain.Join(new PushStringCodec(3))
            .Join(new FrameStringCodec(2))                          //PushCodec(n=3) -> FrameCodec(n=2) -> SwapCodec -> PushCodec(n=3)
            .Join(new SwapStringCodec())
            .Join(new PushStringCodec(3));

            return(new TripAdvisorDecoder(codecChain));
        }