Example #1
0
        private byte[] SerpentA(bool Encrypt, byte[] Key, byte[] Data)
        {
            int len = Data.Length;
            int ct = 0;
            byte[] output = new byte[len];

            using (SPX serent = new SPX())
            {
                serent.Init(Encrypt, Key);

                while (ct < len)
                {
                    serent.Transform(Data, ct, output, ct);
                    ct += 16;
                }
            }

            return output;
        }
Example #2
0
        private byte[] SerpentA(bool Encrypt, byte[] Key, byte[] Data)
        {
            int len = Data.Length;
            int ct  = 0;

            byte[] output = new byte[len];

            using (SPX serent = new SPX())
            {
                serent.Init(Encrypt, Key);

                while (ct < len)
                {
                    serent.Transform(Data, ct, output, ct);
                    ct += 16;
                }
            }

            return(output);
        }