Andromeda: The Encryption Object (White Paper, Part 3): Source Code

The Yull class handles IO, setup, and managing the read and writing of data and submitting that data to the encryption object. The encryption object is the Andromeda class.

The entry point to the code2 is the function initializeDelegateArray(...) which sets up the array of delegates. Next the encrypt() or decrypt() procedure in the Yull class calls either EncryptStart() or DecryptStart() which begins the process. These procedures are identical except that one calls the decrypt delegates and the other the encrypt delegates. Both iterate over the key once. The key will be the same length as the in buffer.

Of course when the the rounds number is greater than 1 the same in buffer will be encrypted again and again but by a different key each time, as constructed by the Yull object.

Note that some of the functions call other ones that may call other ones. All of the Encrypt?? and Decrypt?? functions are prototyped the same way so they do not know or care if the inbuff is the entire read buffer or some subset of that.


 public unsafe class Andromeda
    {
        #region Constructor and Public Variables
        /// 
        /// Andromeda: Constructor
        /// 
        public Andromeda()//constructor
        {
           
        }
        public int iTestMode = 0;
        public byte[] Key;
        public byte[] inBuff;
        public StringBuilder log;
        public long counter = 0;
        public bool inTestMode = false;
        public int iTestProcedure = -1;
        const int cENCRYPT = 0;
        const int cDECRYPT = 1;
       
        #endregion


        #region Cryptography

        void xor(ref byte[] inB, ref byte[] xorBuff)
        {
            if (xorBuff.Length > inB.Length) return;
            for (int j = 0; j < xorBuff.Length; j++)
            {
                inB[j] ^= xorBuff[j];
            }
            
        }
        void doXorDecrypt(ref byte[] inB)
        {
             
             byte[] xorBuff = new byte[inB.Length];
            xor(ref inB, ref xorBuff);

        }
        void doXorEncrypt(ref byte[] inB)
        {
            
            byte[] xorBuff = new byte[inB.Length];
            xor(ref inB, ref xorBuff);
                    
        }
        bool isValueinBuffer(byte value, ref int[] buffer)
        {
            for (int i = 0; i < buffer.Length; i++)
                if (buffer[i] == value) return true;
            return false;

        }
         bool getMatrixOffsets(ref int[] inB2, int keyPosition, int inBLength)
        {
            if (keyPosition + 3 > Key.Length) return false;
            int newOffset = Key[keyPosition] + Key[keyPosition + 1] + Key[keyPosition + 2];


            inB2 = new int[Key.Length]; //holds the unique offsets into the key

            int j = 0;
            for (int i = newOffset; i < Key.Length; i++)
            {

                if (Key[i] > inBLength) continue;

                {
                    if (isValueinBuffer(Key[i], ref inB2) == true)
                    {
                        continue;
                    }

                    inB2[j++] = Key[i];

                }
            }

            Array.Resize(ref inB2, j);


            return true;

        }
         void Decrypt58(ref byte[] inB, int keyPosition)
         {

             byte[] matrix = new byte[1];
              int[] inB2 = new int[Key.Length];
             
             if (getMatrixOffsets(ref inB2, keyPosition, inB.Length) == true)
             {


                 selectMatrixNonContig(ref matrix, ref inB, ref inB2, keyPosition);
                 {
                 for (int i = matrix.Length - 1; i >= 0; i--)
                     Decrypt43(ref matrix, i);
                 returnMatrixNonContig(ref matrix, ref inB, ref inB2, keyPosition);
                 }
             }



         }
         void Encrypt58(ref byte[] inB, int keyPosition)
         {
             counter++;
               byte[] matrix = new byte[1];
             int[] inB2 = new int[Key.Length];

             if (getMatrixOffsets(ref inB2, keyPosition, inB.Length) == true)
             { 
                 selectMatrixNonContig(ref matrix, ref inB, ref inB2, keyPosition);
                 {
                     for (int i = 0; i < matrix.Length; i++)
                         Encrypt43(ref matrix, i); //keyPosition
                     returnMatrixNonContig(ref matrix, ref inB, ref inB2, keyPosition);
                 }
             }


         }

         void Decrypt57(ref byte[] inB, int keyPosition)
         {

             byte[] matrix = new byte[1];
             int[] inB2 = new int[Key.Length];

             if (getMatrixOffsets(ref inB2, keyPosition, inB.Length) == true)
             {


                 selectMatrixNonContig(ref matrix, ref inB, ref inB2, keyPosition);
                 {
                     for (int i = matrix.Length - 1; i >= 0; i--)
                         Decrypt20(ref matrix, i);
                     returnMatrixNonContig(ref matrix, ref inB, ref inB2, keyPosition);
                 }
             }



         }
         void Encrypt57(ref byte[] inB, int keyPosition)
         {
             counter++;
             byte[] matrix = new byte[1];
             int[] inB2 = new int[Key.Length];

             if (getMatrixOffsets(ref inB2, keyPosition, inB.Length) == true)
             { 
                 selectMatrixNonContig(ref matrix, ref inB, ref inB2, keyPosition);
                 {
                     for (int i = 0; i < matrix.Length; i++)
                         Encrypt20(ref matrix, i); //keyPosition
                     returnMatrixNonContig(ref matrix, ref inB, ref inB2, keyPosition);
                 }
             }


         }
         void Encrypt59(ref byte[] inB, int pos) //doSelectNonContigMatrix
         {
             counter++;
             if (pos > inB.Length - 3) return;
             byte[] matrix = new byte[1];
             int[] inB2 = new int[Key.Length];

             if (getMatrixOffsets(ref inB2, pos, inB.Length) == true)
             {


                 selectMatrixNonContig(ref matrix, ref inB, ref inB2, pos); //, Key[10]);
                 for (int i = 0; i < matrix.Length; i++)
                 {
                     if (i < matrix.Length - 1)
                     {
                         reverseBytes(ref matrix, Key[i], Key[i + 1]);
                         rotateArrayLeft(ref matrix);

                     }
                 }
                 returnMatrixNonContig(ref matrix, ref inB, ref inB2, pos);

             } 

         }
         void Decrypt59(ref byte[] inB, int pos) //doSelectNonContigMatrix
         {

             if (pos > inB.Length - 3) return;
             byte[] matrix = new byte[1];
             int[] inB2 = new int[Key.Length];

             if (getMatrixOffsets(ref inB2, pos, inB.Length) == true)
             { 

                 selectMatrixNonContig(ref matrix, ref inB, ref inB2, pos); //, Key[10]);
                 for (int i = 0; i < matrix.Length; i++)
                 {
                     if (i < matrix.Length - 1)
                     {
                         rotateArrayRight(ref matrix);
                         reverseBytes(ref matrix, Key[i], Key[i + 1]);
                     }
                 } 

                 returnMatrixNonContig(ref matrix, ref inB, ref inB2, pos);

             }


         }
         void Encrypt60(ref byte[] inB, int pos) //doSelectNonContigMatrix
         {
             counter++;
             if (pos > inB.Length - 3) return;
             byte[] matrix = new byte[1];
             int[] inB2 = new int[Key.Length];

             if (getMatrixOffsets(ref inB2, pos, inB.Length) == true)
             { 
                 selectMatrixNonContig(ref matrix, ref inB, ref inB2, pos); //, Key[10]);

                 rotateArrayLeftAsBits(ref matrix);

                 returnMatrixNonContig(ref matrix, ref inB, ref inB2, pos); 
             }


         }
         void Decrypt60(ref byte[] inB, int pos) //doSelectNonContigMatrix
         {

             if (pos > inB.Length - 3) return;
             byte[] matrix = new byte[1];
             int[] inB2 = new int[Key.Length];

             if (getMatrixOffsets(ref inB2, pos, inB.Length) == true)
             {
                  
                 selectMatrixNonContig(ref matrix, ref inB, ref inB2, pos); //, Key[10]);

                 rotateArrayRightAsBits(ref matrix);

                 returnMatrixNonContig(ref matrix, ref inB, ref inB2, pos); 
             }


         }
         bool returnMatrixNonContig(ref byte[] matrix, ref byte[] inB, ref int[] inB2, int offset)
         {

             int j = 0;

             for (int i = 0; i < inB2.Length; i++)
             {
                 if (inB2[i] + offset > inB.Length - 1) continue;
                 inB[inB2[i] + offset] = matrix[j++];

             }

             return true;
         }
         bool selectMatrixNonContig(ref byte[] matrix, ref byte[] inB, ref int[] inB2, int offset)
         {

             matrix = new byte[inB2.Length];

             int j = 0;
             for (int i = 0; i < inB2.Length; i++)
             {

                 if (inB2[i] + offset > inB.Length - 1) continue;
                 matrix[j++] = inB[inB2[i] + offset];


             }

             if (matrix.Length < 1) return false; //magic number
             Array.Resize(ref matrix, j);

             return true;

         }
       
        bool selectMatrix(ref byte[] matrix, ref byte[] inB, int keyPosition)
        {
            if (keyPosition + 3 > Key.Length) return false;
            if (inB.Length <= keyPosition + 1) return false;
            int rowWidth = Key[keyPosition + 1];
            int skipAmount = Key[keyPosition];
            int totalAmount = Key[keyPosition + 2];
            int startPosition = keyPosition;
             
                //the deal is not to overrun the end of the inB and also not to select too few or too many
                while (skipAmount > 0x20) skipAmount /= 4; //magic numbers!!!
                //if (skipAmount > 0x20) skipAmount /= 4;
                if (skipAmount < 4) return false;
                if (inB.Length - skipAmount < 0x20) return false;

                if (rowWidth < 0x10) return false;
                if (totalAmount < 0x20) return false;
                while (rowWidth > 0x60) rowWidth /= 4;
                if (rowWidth >= totalAmount) return false;
                matrix = new byte[totalAmount];
                int arrayCounter, rowCounter, outerCounter;

                for (arrayCounter = rowCounter = outerCounter = 0; outerCounter < totalAmount; arrayCounter++, rowCounter++)
                {
                    if (startPosition + skipAmount + outerCounter >= inB.Length - 1 || skipAmount + outerCounter >= totalAmount) break;
                    matrix[arrayCounter] = inB[startPosition + skipAmount + outerCounter];
                    if (rowCounter == rowWidth)
                    {
                        rowCounter = 0;
                        outerCounter += skipAmount;
                        continue;
                    }
                    outerCounter++;
                }
                Array.Resize(ref matrix, arrayCounter);
                if (matrix.Length == 0) return false;
                else return true;
             
        }
       
        void returnMatrix(ref byte[] matrix, ref byte[] inB, int keyPosition)
        {
            //works on the variable array defined above
            if (keyPosition + 3 > Key.Length) return; 
            int rowWidth = Key[keyPosition + 1];
            int skipAmount = Key[keyPosition];
            int totalAmount = Key[keyPosition + 2];
            int startPosition = keyPosition;

            int arrayCounter, rowCounter, outerCounter;
            arrayCounter = rowCounter = outerCounter = 0;
 
                while (rowWidth > 0x60) rowWidth /= 4; //magic number!!!!

                while (skipAmount > 0x20) skipAmount /= 4;

                for (arrayCounter = rowCounter = outerCounter = 0; outerCounter < totalAmount; arrayCounter++, rowCounter++)
                {
                    if (startPosition + skipAmount + outerCounter >= inB.Length - 1 || skipAmount + outerCounter >= totalAmount) break;
                    inB[startPosition + skipAmount + outerCounter] = matrix[arrayCounter];
                    if (rowCounter == rowWidth)
                    {
                        rowCounter = 0;
                        outerCounter += skipAmount;
                        continue;
                    }
                    outerCounter++;
                }
            
        }

        void Encrypt39(ref byte[] inB, int key) //DOES NOT WORK!!!!!!
        {

            for (int i = 0; i < key; i++)
                rotateArrayLeftAsBitsWithXor(ref inB);
        }
        void Decrypt39(ref byte[] inB, int key)
        {
            for (int i = 0; i < key; i++)
                rotateArrayRightAsBitsWithXor(ref inB);
        }
        void rotateArrayLeftAsBitsWithXor(ref byte[] inB)
        {
            if (inB.Length == 0) return;
            counter++;
            rotateArrayLeftAsBits(ref inB);
            for (int i = 0; i < inB.Length; i++)
                inB[i] ^= Key[i];
        }
        void rotateArrayRightAsBitsWithXor(ref byte[] inB)
        {
            if (inB.Length == 0) return;
            counter++;
            for (int i = 0; i < inB.Length; i++)
                inB[i] ^= Key[i];
            rotateArrayRightAsBits(ref inB);
        }
        void Encrypt46(ref byte[] inB, int k)
        {
            negateArray(ref inB);
        }
        void Decrypt46(ref byte[] inB, int k)
        {
            negateArray(ref inB);
        }
        void negateArray(ref byte[] inB)
        {
            counter++;
            for (int i = 0; i < inB.Length; i++)
                inB[i] = (byte)~inB[i];

        }
        void rotateArrayLeftAsBits(ref byte[] inB)
        {
            if (inB.Length == 0) return;
            counter++;
            //just like ROL but on a byte stream; treats byte stream as a bit stream

            byte[] outB = new byte[inB.Length];
            byte[] bits = new byte[inB.Length];

            int i;
            for (i = 0; i < inB.Length; i++)
            {
                if ((inB[i] & 0x80) == 0x80)
                    bits[i] = 1; //save the high bit for later
                outB[i] = (byte)(inB[i] << 1); //SHIFT LEFT ONE

            }

            //now add in the saved high bits
            for (i = 1; i < inB.Length; i++)
                outB[i - 1] |= bits[i];
            outB[inB.Length - 1] |= bits[0];

            //copy back into inB
            System.Buffer.BlockCopy(outB, 0, inB, 0, inB.Length);

        }

        void rotateArrayRightAsBits(ref byte[] inB)
        {

            if (inB.Length == 0) return;
            counter++;

            byte[] outB = new byte[inB.Length];
            byte[] bits = new byte[inB.Length];

            int i;
            for (i = 0; i < inB.Length; i++)
            {
                if ((inB[i] & 1) == 1)
                    bits[i] = 0x80;
                outB[i] = (byte)(inB[i] >> 1);
            }

            for (i = 0; i < inB.Length - 1; i++)
                outB[i + 1] |= bits[i];


            outB[0] |= bits[inB.Length - 1];
            System.Buffer.BlockCopy(outB, 0, inB, 0, inB.Length);


        }
        void rotateArrayLeft(ref byte[] inB)
        {
            if (inB.Length == 0) return;
            //as bytes not bits
            counter++;
            byte a = inB[inB.Length - 1];
            for (int i = inB.Length - 1; i > 0; i--)
                inB[i] = inB[i - 1];
            inB[0] = a;
        }

        void rotateArrayRight(ref byte[] inB)
        {
            if (inB.Length == 0) return;
            //as bytes not bits
            counter++;
            byte a = inB[0];
            for (int i = 1; i < inB.Length; i++)
                inB[i - 1] = inB[i];
            inB[inB.Length - 1] = a;
        }

        void rotateArrayRightAsBitsCount(ref byte[] inB, int Count)
        { 
            for (int i = 0; i < Count; i++) rotateArrayRightAsBits(ref inB);
        }
        void rotateArrayLeftAsBitsCount(ref byte[] inB, int Count)
        {

            for (int i = 0; i < Count; i++) rotateArrayLeftAsBits(ref inB);
        }

        void rotateArrayRightAsBitsCountwithXor(ref byte[] inB, int Count)
        {

            for (int i = 0; i < Count; i++) rotateArrayRightAsBits(ref inB);
        }
        void rotateArrayLeftAsBitsCountwithXor(ref byte[] inB, int Count)
        {

            for (int i = 0; i < Count; i++)
            {
                rotateArrayLeftAsBits(ref inB);
            }

        }

        void returnBits(ref byte[] bitArray, ref byte[] inB, byte Mask)
        {
            Mask = (byte)~Mask;
            for (int i = 0; i < inB.Length; i++)
            {

                inB[i] &= Mask; //clear out
                inB[i] |= bitArray[i];
            }

        }

        byte[] getBits(ref byte[] inB, byte Mask)
        {

            byte[] bitArray = new byte[inB.Length];
            for (int i = 0; i < inB.Length; i++)
                bitArray[i] = (byte)(inB[i] & Mask);

            return bitArray;

        }
       
        void Encrypt36(ref byte[] inB, int k)
        {
            byte[] matrix = getBits(ref inB, (byte)k);

            rotateArrayLeft(ref matrix);
            returnBits(ref matrix, ref inB, (byte)k);

        }
        void Decrypt36(ref byte[] inB, int k)
        {

            byte[] matrix = getBits(ref inB, (byte)k);
            rotateArrayRight(ref matrix);

            returnBits(ref matrix, ref inB, (byte)k);

        }
        void Encrypt37(ref byte[] inB, int k)
        {

            byte[] matrix = getBits(ref inB, (byte)k);

            reverseBytes(ref matrix, matrix.Length, k);
            rotateArrayLeft(ref matrix);
            returnBits(ref matrix, ref inB, (byte)k);
        }
        void Decrypt37(ref byte[] inB, int k)
        {
            byte[] matrix = getBits(ref inB, (byte)k);
            rotateArrayRight(ref matrix);

            reverseBytes(ref matrix, matrix.Length, k);
            returnBits(ref matrix, ref inB, (byte)k);
        }
        void Encrypt38(ref byte[] inB, int k)
        {
            byte[] matrix = getBits(ref inB, (byte)k);
            reverseBytes(ref matrix, matrix.Length - 1, k);
            rotateArrayLeft(ref matrix);
            returnBits(ref matrix, ref inB, (byte)k);
        }
        void Decrypt38(ref byte[] inB, int k)
        {
            byte[] matrix = getBits(ref inB, (byte)k);
            rotateArrayRight(ref matrix);
            reverseBytes(ref matrix, matrix.Length - 1, k);

            returnBits(ref matrix, ref inB, (byte)k);
        }
        void Encrypt45(ref byte[] inB, int k) //NOTE: ADD Encrypt39 to delegate list same with X45
        {

            byte[] matrix = getBits(ref inB, (byte)k);

            reverseBytes(ref matrix, matrix.Length, k);
            rotateArrayLeft(ref matrix);
            AdjacentSwapEncrypt(ref matrix);
            returnBits(ref matrix, ref inB, (byte)k);
        }
        void Decrypt45(ref byte[] inB, int k)
        {

            byte[] matrix = getBits(ref inB, (byte)k);
            AdjacentSwapDecrypt(ref matrix);
            rotateArrayRight(ref matrix);

            reverseBytes(ref matrix, matrix.Length, k);
            returnBits(ref matrix, ref inB, (byte)k);
        }
   
        void Encrypt42(ref byte[] inB, int keyPosition)
        { 
            counter++;
            byte[] temp = getBits(ref inB, (byte)keyPosition);

            reverseBytes(ref temp, temp.Length - 1, keyPosition);  
            returnBits(ref temp, ref inB, (byte)keyPosition); 

        }
        void Decrypt42(ref byte[] inB, int keyPosition)
        {

            byte[] temp = getBits(ref inB, (byte)keyPosition); 
            reverseBytes(ref temp, temp.Length - 1, keyPosition); 
            returnBits(ref temp, ref inB, (byte)keyPosition);

        }
        void Encrypt43(ref byte[] inB, int keyPosition)
        { 
            counter++;
            byte[] temp = getBits(ref inB, (byte)keyPosition);

            rotateArrayLeft(ref temp);
            returnBits(ref temp, ref inB, (byte)keyPosition); 

        }
        void Decrypt43(ref byte[] inB, int keyPosition)
        { 
            byte[] temp = getBits(ref inB, (byte)keyPosition);

            rotateArrayRight(ref temp);

            returnBits(ref temp, ref inB, (byte)keyPosition);

        }
        void Encrypt40(ref byte[] inB, int keyPosition)
        { 
            if (keyPosition >= inB.Length - 2) return; //since we get KeyPositon, keyPositon+1 and keyPosition+2
            counter++;
            byte[] matrix = new byte[1];
            if (selectMatrix(ref matrix, ref inB, keyPosition) == false)
                return;
            { 
                for (int i = 0; i < matrix.Length; i++)
                    Encrypt20(ref matrix, i); //was keyPosition
                returnMatrix(ref matrix, ref inB, keyPosition);
            }

        }
        void Decrypt40(ref byte[] inB, int keyPosition)
        {
             
            if (keyPosition >= inB.Length - 2) return; //since we get KeyPositon, keyPositon+1 and keyPosition+2
            byte[] matrix = new byte[1];
            if (selectMatrix(ref matrix, ref inB, keyPosition) == false)
                return;
            {
              
                for (int i = matrix.Length - 1; i >= 0; i--)
                    Decrypt20(ref matrix, i); //was keyPosition
                returnMatrix(ref matrix, ref inB, keyPosition);
            }

        }
        void Decrypt44(ref byte[] inB, int keyPosition)
        {
            
            byte[] matrix = new byte[1];
            if (selectMatrix(ref matrix, ref inB, keyPosition) == true)
            {
                for (int i = matrix.Length - 1; i >= 0; i--)
                    Decrypt43(ref matrix, i);
                returnMatrix(ref matrix, ref inB, keyPosition);
            }



        }
        void Encrypt44(ref byte[] inB, int keyPosition)
        { 
            counter++;

            byte[] matrix = new byte[1];
            if (selectMatrix(ref matrix, ref inB, keyPosition) == true)
            {
                for (int i =0; i<matrix.Length; i++)
                    Encrypt43(ref matrix, i); //keyPosition
                returnMatrix(ref matrix, ref inB, keyPosition);
            } 
        }
        void Encrypt41(ref byte[] inB, int keyPosition)
        {

            counter++;

                byte[] matrix = new byte[1];
                if (selectMatrix(ref matrix, ref inB, keyPosition) == true)
                {
                    for (int i = 0; i < matrix.Length; i++)
                        XOR(matrix[i], (byte)keyPosition);

                    returnMatrix(ref matrix, ref inB, keyPosition);
                } 
        }
        void Decrypt41(ref byte[] inB, int keyPosition)
        {
            byte[] matrix = new byte[1];
            if (selectMatrix(ref matrix, ref inB, keyPosition) == true)
            {

                for (int i = 0; i < matrix.Length; i++)
                    XOR(matrix[i], (byte)keyPosition);
                returnMatrix(ref matrix, ref inB, keyPosition);
            }

        }
        void theSwapMethod(ref byte[] inB, int direction, int iBlock)
        {

            //direction = 0: encrypt 
            //direction = 1; decrypt
            //divide the buffer into iblock number of blocks with a remainder.
            //move each block left one
            if (iBlock == 0) return;

            counter++;

            //int index = block;
            byte[][] tempArray;
            byte[] remainderArray = null;
            
            int powerofTwoBucket = iBlock; //force it!! iBlock = 8
            //divide the arraysize by the block
          
                int remainder = inB.Length % powerofTwoBucket;
                if (remainder < 20) return;
                tempArray = new byte[powerofTwoBucket][];

                for (int i = 0; i < powerofTwoBucket; i++)
                    tempArray[i] = new byte[inB.Length / powerofTwoBucket];

                //now copy the inB into these temp arrays:
                int madCounter = 0;

                /*
                  * Theory of the swap;
                  *    12345678   12345678    12345678   12345678   12345678 
                  * maps to
                  *    tempArray1 tempArray2  tempArray3 tempArray4 tempArray5
                  * 
                  * now, output in this order
                  * tempArray2, tempArray3, tempArray4, tempArray5, tempArray1 ETC
                  * for encrypt
                  * for DECRYPT
                  * output in this order
                  * array5, array1, array2, array3, array4
                  *(that's for encrypt
			  
                 */
                //break the incoming array (b) into the tempArrays
                //COUNTER may have a value > 0 because of remainder

                //now do the swap

                byte[] outB = new byte[inB.Length];
                if (direction == 0) //encrypt
                {


                    if (remainder > 0)
                    {
                        remainderArray = new byte[remainder];
                        for (madCounter = 0; madCounter < remainder; madCounter++)
                            remainderArray[madCounter] = inB[madCounter];
                    }
                    //do the rest of the array starting with temp[1]
                    for (int i = 1; i < tempArray.Length; i++)
                        for (int j = 0; j < inB.Length / powerofTwoBucket; j++)
                            tempArray[i][j] = inB[madCounter++];

                    //now do temp0

                    for (int i = 0; i < inB.Length / powerofTwoBucket; i++) //was tempArray[0].Length...why?
                        tempArray[0][i] = inB[madCounter++];

                    //at this point, inB should be broken down like this:
                    //R, temp1, temmp2, temp3..., temp0

                    //copy it back to inB: first temp0, then any remainder, then the rest of the temps
                    madCounter = 0;

                    for (int i = 0; i < tempArray.Length; i++)
                        for (int j = 0; j < tempArray[i].Length; j++)
                            outB[madCounter++] = tempArray[i][j];

                    //				for (int r = 0 ; r<tempArray[0].Length; r++)
                    //					outB[counter++]=tempArray[0][r];

                    if (remainder > 0)
                    {
                        for (int i = 0; i < remainderArray.Length; i++)
                            outB[madCounter++] = remainderArray[i];
                    }


                    for (int i = 0; i < inB.Length; i++)
                        inB[i] = outB[i];

                    //				
                }
                else //decrypt
                {
 
                    for (int i = 0; i < tempArray.Length; i++)
                        for (int j = 0; j < inB.Length / powerofTwoBucket; j++)
                            tempArray[i][j] = inB[madCounter++];

                    
                    if (remainder > 0)
                    {
                        remainderArray = new byte[remainder];
                        for (int i = 0; i < remainderArray.Length; i++)
                            remainderArray[i] = inB[madCounter++];


                    }
                    //at this point, inB should be broken down like this:
                    //R, temp1, temmp2, temp3..., temp0

                    //copy it back to inB: first temp0, then any remainder, then the rest of the temps
                    madCounter = 0;
                    if (remainder > 0)
                    {
                        for (int i = 0; i < remainderArray.Length; i++)
                            outB[madCounter++] = remainderArray[i];
                    }
                    for (int i = 1; i < tempArray.Length; i++)
                        for (int j = 0; j < tempArray[i].Length; j++)
                            outB[madCounter++] = tempArray[i][j];
                    for (int r = 0; r < inB.Length / powerofTwoBucket; r++)  //was tempArray[0].Length...why?
                        outB[madCounter++] = tempArray[0][r];
                    for (int i = 0; i < inB.Length; i++)
                        inB[i] = outB[i];
                }
        }
      
       void Encrypt25(ref byte[] inB, int k)
        {
            counter++;

            rotateArrayLeftAsBitsCount(ref inB, Key[k] % 8); //CHANGED 9/24/2013 to K; doesn't work. back to 8...why?

        }

        void Decrypt25(ref byte[] inB, int k)
        {

            counter++;
            rotateArrayRightAsBitsCount(ref inB, Key[k] % 8);


        }
        void Decrypt24(ref byte[] inB, int k)
        {
            int m = 0; //iterator limit
            if (Key[k] > inB.Length) m = inB.Length;
            else m = Key[k];

            for (int i = m - 1; i >= 0; i--)
            {
                if (Key[i] <= k) continue;
                byte[] values = selectBytes(ref inB, Key[i]);
                if (values == null) continue;
                rotateArrayRightAsBits(ref values);
                returnBytes(ref inB, ref values, Key[i]);
            } 

        }
        void Encrypt24(ref byte[] inB, int k)
        {
            int i = 0;
            
                counter++;

                int m = 0; //iterator limit

                if (Key[k] > inB.Length) m = inB.Length;
                else m = Key[k];
                for (i = 0; i < m; i++)
                {

                    if (Key[i] <= k) continue;

                    byte[] values = selectBytes(ref inB, Key[i]);
                    if (values == null) continue;
                    rotateArrayLeftAsBits(ref values);
                    returnBytes(ref inB, ref values, Key[i]);
                } 
        }
       
        
        void Decrypt53(ref byte[] inB, int k)
        {
            byte[] values = getBits(ref inB, (byte)k);
            AdjacentSwapDecrypt(ref values);
            //decrypt[Key[k]](ref values, k);
            returnBits(ref values, ref inB, (byte)k);
        }

        void Encrypt53(ref byte[] inB, int k)
        {
            counter++;
            byte[] values = getBits(ref inB, (byte)k);
           // encrypt[Key[k]](ref values, k);
            AdjacentSwapEncrypt(ref values);
            returnBits(ref values, ref inB, (byte)k);
        }

        void Decrypt23(ref byte[] inB, int k)
        {
            int i = Key[k];
            byte[] values = getBits(ref inB, (byte)k);
            Decrypt1(ref values, k);
            if (i < 130 || i >= 135) decrypt[i](ref values, k);
            //Decrypt1(ref values, k);
            returnBits(ref values, ref inB, (byte)k);
        }
        void Encrypt23(ref byte[] inB, int k)
        {
             
            counter++;
            int i = Key[k];
            byte[] values = getBits(ref inB, (byte)k);
            ////avoid Encrypt23
            if (i < 130 || i >= 135) encrypt[i](ref values, k);
            Encrypt1(ref values, k);
            returnBits(ref values, ref inB, (byte)k);
 

        }
        void Encrypt26(ref byte[] inB, int k)
        {

            counter++;
            byte[] values;
            int m = 0; //iterator limit
            if (Key[k] > inB.Length) m = inB.Length;
            else m = Key[k];

            for (int i = 0; i < m; i++)
            {

                if (Key[i] <= k) continue;

                values = selectBytes(ref inB, Key[i]);
                if (values == null) continue;
                rotateArrayLeft(ref values);
                returnBytes(ref inB, ref values, Key[i]); 
            }
        }
        void Decrypt26(ref byte[] inB, int k)
        {

            //ignore int k; it's just for compatibility
            int m = 0; //iterator limit
            if (Key[k] > inB.Length) m = inB.Length;
            else m = Key[k];
            // for (int i = inB.Length - 1; i >= 0; i--)
            for (int i = m - 1; i >= 0; i--)
            {
                if (Key[i] <= k) continue;
                byte[] values = selectBytes(ref inB, Key[i]);
                if (values == null) continue;
                rotateArrayRight(ref values);//was rotateArrayRightAsBits...too many of them, no need.
                returnBytes(ref inB, ref values, Key[i]);
            }

        }
        void Decrypt28(ref byte[] inB, int k)
        {

            for (int i = inB.Length - 3; i >= 0; i--) //changed to -3!!! 10/21/2013 
            {
                if (Key[i] < Key[i + 1])
                {
                    byte a = inB[i];

                    inB[i] = inB[i + 1];

                    inB[i + 1] = a;
                }
            }
        }
        void Encrypt28(ref byte[] inB, int k)
        {

            counter++;

            for (int i = 0; i < inB.Length - 2; i++) //CHANGED TO Key.Length - 2 from -1...does this fuck things up?
            {
                if (Key[i] < Key[i + 1])
                {
                    byte a = inB[i];

                    inB[i] = inB[i + 1];

                    inB[i + 1] = a;
                }
            }


        }
        void Encrypt47(ref byte[] inB, int k)
        {
             
            counter++;
            
            byte[] values= selectBytes(ref inB, k);
            if (values == null) return;
            //Encrypt23(ref values, k);enc
            Encrypt2(ref values, k);
             
            returnBytes(ref inB, ref values, k);

        }
        void Decrypt47(ref byte[] inB, int k)
        {
            byte[] values = selectBytes(ref inB, k);
            if (values == null) return;
            Decrypt2(ref values, k);
           
           // Decrypt23(ref values, k); 
            
            returnBytes(ref inB, ref values, k);

        }
         byte[] selectBytesRange(ref byte[] inB, int KeyValue)
        {
            if (KeyValue == 0) return null;
            if (KeyValue > Key.Length - 1) return null;
            if (Key[KeyValue] ==0) return null;
            if (inB.Length <= KeyValue + Key[KeyValue]) return null;
            byte[] values = new byte[Key[KeyValue]];
            Buffer.BlockCopy(inB, KeyValue, values, 0, Key[KeyValue]);
            return values;
        }
        void returnBytesRange(ref byte[] inB, int KeyValue, ref byte[] values)
        {
            Buffer.BlockCopy(values, 0, inB, KeyValue, values.Length); 
        }
         byte[] selectBytes(ref byte[] inB, int KeyValue)
        {
            
            if (KeyValue == 0) return null;
            int size = inB.Length / (KeyValue);
            byte[] select = new byte[size + 1];
            int i = 0;
            int selectI = 0; 

                for (i = 0; i < inB.Length; )
                {

                    if (selectI > select.Length - 1)
                    {
                        break;
                    }
                    select[selectI] = inB[i];
                    selectI++;
                    i += KeyValue;
                }
                Array.Resize(ref select, selectI);
            
            return select;

        }
         void returnBytes(ref byte[] inB, ref byte[] returnB, int KeyValue)
        {
           
            if (KeyValue == 0) return;
            
                for (int i = 0; i < returnB.Length; i++)
                {
                    inB[i * KeyValue] = returnB[i];

                }
        }

         
         byte ROR(byte val, int count)
        {
            counter++;
            for (int i = 0; i < count; i++)
            {
                val = (byte)((val << 7) | (val >> 1));
            }
            return val;
        }

         byte ROL(byte val, int count)
        {

            counter++;
            for (int i = 0; i < count; i++)
                val = (byte)((val >> 7) | (val << 1));
            return val;

        }
         byte XOR(byte x, byte y)
        {
            counter++;

            return (byte)(x ^ y);
        }
         byte XORROR(byte val, int count)
        {
            counter++;

            for (int i = 0; i < count; i++)
            {
                val = (byte)((val << 7) | (val >> 1));
                val = (byte)(val ^ i);
            }
            return val;
        }

         void getValues(ref int Start, ref int Count, ref byte[] inB)
        {

            //normalmize values to less than inB.Length
            double fStart = Math.Abs(Math.Sin(Start)) * inB.Length;
            double fCount = Math.Abs(Math.Sin(Count)) * inB.Length;

            Start = (int)fStart;
            Count = (int)fCount;
        }
         void doReverseBytes(ref byte[] inB, int i)
        {

            if (i < inB.Length - 1)
            {
                counter++;
                reverseBytes(ref inB, Key[i], Key[i + 1]);
            }


        }
         void reverseBits(ref byte[] inB, int Count, int Start)
        {
            int iStart = Start;
            int iCount = Count;
            getValues(ref iStart, ref iCount, ref inB);
            if (iCount <= 1) return;
            counter++;
            if ((iStart + iCount) > inB.Length - 1) return;
            byte[] b = new byte[iCount];
            System.Buffer.BlockCopy(inB, iStart, b, 0, iCount);
            rotateArrayLeftAsBits(ref  b);
            System.Buffer.BlockCopy(b, 0, inB, iStart, iCount);


        }
         void reverseBitsDecrypt(ref byte[] inB, int Count, int Start)
        {
            int iStart = Start;
            int iCount = Count;
            getValues(ref iStart, ref iCount, ref inB);
            if (iCount <= 1) return;

            if ((iStart + iCount) > inB.Length - 1) return;
            byte[] b = new byte[iCount];
            System.Buffer.BlockCopy(inB, iStart, b, 0, iCount);
            rotateArrayRightAsBits(ref  b);
            System.Buffer.BlockCopy(b, 0, inB, iStart, iCount);


        }
         void reverseBytes(ref byte[] inB, int Count, int Start)
        { 
            counter++;  
            if (Start + Count > inB.Length) return;
            byte[] b = new byte[Count];
            System.Buffer.BlockCopy(inB, Start, b, 0, Count);
            Array.Reverse(b);
            System.Buffer.BlockCopy(b, 0, inB, Start, Count); 
        }
         void AdjacentSwap(ref byte[] inB)
        {
            //like AdjacentSwapEncrypt but on the bit level
            //warning: use on a sub buffer as it is probably slow
            //I think it's both encrypt and decrypt...testing with Encrypt28
            counter++;

            for (int i = 0; i < inB.Length - 1; i++)  //changed to -2 from -1
            {
                if (Key[i] < Key[i + 1])
                {
                    byte a = inB[i];

                    inB[i] = inB[i + 1];

                    inB[i + 1] = a;
                }
            }

        }
         void AdjacentSwapDecryptb(ref byte[] inB)
        {

            for (int i = 0; i < inB.Length - 1; i++)  //changed to -2 from -1
            {
                if (Key[i] < Key[i + 1])
                {
                    byte a = inB[i];
                    // byte b = inB[i + 1];
                    inB[i] = inB[i + 1];
                    // inB[i] = b;
                    inB[i + 1] = a;

                }
            }

        }

         void AdjacentSwapEncrypt(ref byte[] inB)
        {
            counter++;

            for (int i = 0; i < inB.Length - 1; i++) //changed to -2 from -1
            {
                if (Key[i] < Key[i + 1])
                {
                    byte a = inB[i];
                    byte b = inB[i + 1];
                    inB[i] = b;
                    inB[i + 1] = a; 
                }
            }
        }
         void AdjacentSwapDecrypt(ref byte[] inB)
        {
            for (int i = inB.Length - 1; i > 0; i--)
            {
                if (Key[i] > Key[i - 1])
                {
                    byte a = inB[i];
                    byte b = inB[i - 1];
                    inB[i] = b;
                    inB[i - 1] = a; 
                }
            }
        }

         void swapBlocks(ref byte[] inB, int Key1, int Key2, int Count)
        {

            getValues(ref Key1, ref Key2, ref inB);
            //normalizes Key1 and Key2 to within the length of inB
            //now we replace the subarray starting at Key1 for Count bytes with the subarray at Key 
            if ((Key1 + Count > inB.Length || Key2 + Count > inB.Length) || (Key1 + Count >= Key2)) return;

            counter++;

            byte[] sub1 = new byte[Count];
            byte[] sub2 = new byte[Count];
            for (int i = 0; i < Count; i++)
            {
                sub1[i] = inB[Key1 + i];
                sub2[i] = inB[Key2 + i];
            }
            for (int i = 0; i < Count; i++)
            {
                inB[Key1 + i] = sub2[i];
                inB[Key2 + i] = sub1[i];
            }
        }

         void swapBytes(ref byte[] inB, int Key1, int Key2)
        {
            counter++;

            getValues(ref Key1, ref Key2, ref inB);
            if (Key1 > inB.Length - 1 || Key2 > inB.Length - 1) return;
            byte a = inB[Key1];
            // byte b = inB[Key2];
            inB[Key1] = inB[Key2];
            inB[Key2] = a;
        }

         public void createLongKeyExternal(ref byte[] Key, int BufLength)
         {

              
                 if (Key.Length == BufLength) return;
                 if (Key.Length > BufLength)
                 {
                     Array.Resize(ref Key, BufLength);
                     // return;
                 }

                 byte[] newBuf = new byte[BufLength];
                 int i;

                 int remainder = BufLength % Key.Length;
                 int times = BufLength / Key.Length;

                 //need to make this more random, shift leff or right dependant on the key or something
                 for (i = 0; i < times; i++)
                 {

                     System.Buffer.BlockCopy(Key, 0, newBuf, Key.Length * (i * 1), Key.Length);
                     rotateArrayRightAsBits(ref Key);
                     //System.Buffer.BlockCopy(Key,0,newBuf,Key.Length*(i+1),Key.Length);
                     rotateArrayLeft(ref Key);

                 }

                 rotateArrayRightAsBits(ref newBuf);
                 System.Buffer.BlockCopy(Key, 0, newBuf, Key.Length * (i), remainder);
                 Key = new byte[newBuf.Length];
                 System.Buffer.BlockCopy(newBuf, 0, Key, 0, newBuf.Length);
         }

        bool createLongKey(ref byte[] Key, int BufLength)
        {
             
            try {
                if (Key.Length == inBuff.Length) return true;
                if (Key.Length > BufLength)
                {
                    Array.Resize(ref Key, BufLength);
                    // return;
                }

                byte[] newBuf = new byte[BufLength];
                int i;

                int remainder = BufLength % Key.Length;
                int times = BufLength / Key.Length;

                //need to make this more random, shift leff or right dependant on the key or something
                for (i = 0; i < times; i++)
                {

                    System.Buffer.BlockCopy(Key, 0, newBuf, Key.Length * (i * 1), Key.Length);
                    rotateArrayRightAsBits(ref Key);
                    //System.Buffer.BlockCopy(Key,0,newBuf,Key.Length*(i+1),Key.Length);
                    rotateArrayLeft(ref Key);

                }

                rotateArrayRightAsBits(ref newBuf);
                System.Buffer.BlockCopy(Key, 0, newBuf, Key.Length * (i), remainder);
                Key = new byte[newBuf.Length];
                System.Buffer.BlockCopy(newBuf, 0, Key, 0, newBuf.Length);
             
                return true;

            }
            catch (Exception ex)
            {
                if (log == null) return false; //BADDDDDDDD
                log.AppendLine("Error creating log key: " + ex.Message);
                return false;
            }

        }


        void Encrypt1(ref byte[] inB, int i)
        {
            counter++;

            if (i < inB.Length - 1)
            {
                reverseBytes(ref inB, Key[i], Key[i + 1]);
                
            }

        }
        void Decrypt1(ref byte[] inB, int i)
        {

            if (i < inB.Length - 1)
            {
                reverseBytes(ref inB, Key[i], Key[i + 1]);
            }

        }
        void Encrypt2(ref byte[] inB, int i)
        {
            counter++;

            if (i < inB.Length - 2) //avoid buffer overruns
                if (Key[i + 1] != 0 && Key[i] % Key[i + 1] > 3) //magic number 3
                    //I could use one of the key values but I can't be guaranteed
                    //they would fall within a useful range; THIS cuts down 
                    //on the number of calls to rotateArrayRight
                    rotateArrayRightAsBits(ref inB);

        }
        void Decrypt2(ref byte[] inB, int i)
        {
            if (i < inB.Length - 2)
                if (Key[i + 1] != 0 && Key[i] % Key[i + 1] > 3)
                    rotateArrayLeftAsBits(ref inB);
        }

        void Encrypt20(ref byte[] inB, int i)
        {
            counter++; 
            if (i > inB.Length - 1) return;
            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayRightAsBits(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]);

        }
        void Decrypt20(ref byte[] inB, int i)
        { 
            if (i > inB.Length - 1) return;
            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayLeftAsBits(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]);

        }
        void Encrypt3(ref byte[] inB, int i)
        {
            counter++;

            if (i > inB.Length - 1) return;
            if (i < Key.Length - 2 && Key[i + 1] != 0)
            {


                if (Key[i] % Key[i + 1] > Key[i])
                {

                    inB[i] = ROR(inB[i], Key[i]);

                }
                else
                {

                    inB[i] = ROL(inB[i], Key[i]);

                }
            }
            inB[i] = (byte)(inB[i] ^ Key[i]);


        }
     
        void Encrypt31(ref byte[] inB, int i)
        {

            counter++;

            for (int k = 0; k < inB.Length; k++)
            {
                
                Encrypt34(ref inB, k); //Encrypt3
            }


        }
        void Decrypt31(ref byte[] inB, int i)
        { 
            for (int k = 0; k < inB.Length; k++)
            { 
                Decrypt34(ref inB, k); 
            }

        }
        void Decrypt3(ref byte[] inB, int i)
        {


            if (i > inB.Length - 1) return;
            inB[i] = (byte)(inB[i] ^ Key[i]);
            if (i < Key.Length - 2 && Key[i + 1] != 0)
            {


                if (Key[i] % Key[i + 1] > Key[i])
                {

                    inB[i] = ROL(inB[i], Key[i]);

                }
                else
                {

                    inB[i] = ROR(inB[i], Key[i]);

                }
            }


        }

        void Encrypt4(ref byte[] inB, int i)
        {
            counter++;

            if (i > inB.Length - 1) return; 
            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayRightAsBits(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]); 
        }

        void Decrypt4(ref byte[] inB, int i)
        {
            if (i > inB.Length - 1) return;

            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayLeftAsBits(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]); 
        }
        void Encrypt34(ref byte[] inB, int n)
        {
            counter++;

            int k = 0;
            byte[] values;
            int m = 0; //iterator limit
            if (Key[k] > inB.Length) m = inB.Length;
            else m = Key[k];

            for (int i = 0; i < m; i++)
            { 
                    if (Key[i] <= k) continue;
                    if (i > Key.Length - 2) continue;
                    values = selectBytes(ref inB, Key[i]);
                    if (values == null) continue;
                    
                    if (i >= values.Length) continue;
                    reverseBytes(ref values, Key[i], Key[i + 1]);
                    values[i] = ROR(values[i], Key[i]);
                    swapBytes(ref values, i, i + 1);
                    returnBytes(ref inB, ref values, Key[i]); 
            }

        }

        void Decrypt34(ref byte[] inB, int n)
        {
            int k = 0;
            int m = 0; //iterator limit
            if (Key[k] > inB.Length) m = inB.Length;
            else m = Key[k];
            // for (int i = inB.Length - 1; i >= 0; i--)
            for (int i = m - 1; i >= 0; i--)
            {
                if (Key[i] <= k) continue;
                if (i > Key.Length - 2) continue; //10-21-2013: NEW: DISCOVERED ARRAY ELEMENT OUT OF RANGE ERROR
                byte[] values = selectBytes(ref inB, Key[i]);
                if (values == null) continue;
                if (i >= values.Length) continue;
                swapBytes(ref values, i, i + 1);
                values[i] = ROL(values[i], Key[i]);
                reverseBytes(ref values, Key[i], Key[i + 1]);
                returnBytes(ref inB, ref values, Key[i]);
            }

        }
        void Encrypt5(ref byte[] inB, int i)
        {
            counter++;
            if (i < inB.Length - 2)
                if (Key[i + 1] != 0 && Key[i] % Key[i + 1] > Key[i]) //just want to add a randomizing element, that's all. 
                    
                    //note, nothing magical about the if condition. Just wanted to add an element of random into it.
                    rotateArrayRightAsBits(ref inB);

        }
        void Decrypt5(ref byte[] inB, int i)
        {

            if (i < inB.Length - 2)
                //HAVE TO FIX THAT USE OF 3; no HARD CODED VALUES!!!! (see above; 9/25/2013)
                if (Key[i + 1] != 0 && Key[i] % Key[i + 1] > Key[i])
                    rotateArrayLeftAsBits(ref inB);

        }

        void Decrypt6(ref byte[] inB, int i)
        { 
            if (i < inB.Length - 2)
            {
                swapBytes(ref inB, i, i + 1);
                inB[i] = (byte)(inB[i] ^ Key[i]);
                reverseBytes(ref inB, Key[i], Key[i + 1]);
            } 
        }
        void Encrypt6(ref byte[] inB, int i)
        {
            counter++;

            if (i < inB.Length - 2)
            {
                reverseBytes(ref inB, Key[i], Key[i + 1]);
                inB[i] = (byte)(inB[i] ^ Key[i]);
                swapBytes(ref inB, i, i + 1);
            } 
        }
        void Encrypt35(ref byte[] inB, int i)
        {
            byte[] values = selectBytes(ref inB, Key[i]);
            if (values == null) return;
            Encrypt34(ref values, Key[i]);
            returnBytes(ref inB, ref values, Key[i]);
        }
        void Decrypt35(ref byte[] inB, int i)
        {
            byte[] values = selectBytes(ref inB, Key[i]);
            if (values == null) return;
            Decrypt34(ref values, Key[i]);
            returnBytes(ref inB, ref values, Key[i]);
        }
         
        void Encrypt29(ref byte[] inB, int i)
        {
            counter++;

            theSwapMethod(ref inB, cENCRYPT, Key[i]);

        }

        void Decrypt29(ref byte[] inB, int i)
        {

            theSwapMethod(ref inB, cDECRYPT, Key[i]);
        }

        void Encrypt32(ref byte[] inB, int i) //PROBLEMS: DOESN"T WORK RIGHT
        {
            counter++;

            byte[] values = selectBytes(ref inB, Key[i]);
            if (values == null) return;
            theSwapMethod(ref values, cENCRYPT, Key[i]);
            returnBytes(ref inB, ref values, Key[i]);

        }

        void Decrypt32(ref byte[] inB, int i)
        {
            byte[] values = selectBytes(ref inB, Key[i]);
            if (values == null) return;
            theSwapMethod(ref values, cDECRYPT, Key[i]);
            returnBytes(ref inB, ref values, Key[i]);

        }

        void Encrypt7(ref byte[] inB, int i)
        {

            counter++;

            
            if (i > 0 && Key[i - 1] != 0 && i % 3 == 0) //magic numbers!!!!!
            {
                //set up some condition so that the entire array isn't iterated over

                if (Key[i] % Key[i - 1] < Key[i]) theSwapMethod(ref inB, cENCRYPT, Key[i]); 
            }

        }

        void Decrypt7(ref byte[] inB, int i)
        {
             
            if (i > 0 && Key[i - 1] != 0 && i % 3 == 0)
            {
                //set up some condition so that the entire array isn't iterated over
                if (Key[i] % Key[i - 1] < Key[i]) theSwapMethod(ref inB, cDECRYPT, Key[i]);
            }

        }
        void Encrypt8(ref byte[] inB, int i)
        {
            counter++;

            rotateArrayLeft(ref inB);

        }
        void Decrypt8(ref byte[] inB, int i)
        {

            rotateArrayRight(ref inB);

        }
        void Encrypt9(ref byte[] inB, int i)
        {
            counter++;

            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayRight(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]);

        }
        void Decrypt9(ref byte[] inB, int i)
        {

            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayLeft(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]);

        }
        void Encrypt10(ref byte[] inB, int i)
        {
            counter++;

            if (i < inB.Length - 2)
            {
                reverseBytes(ref inB, Key[i], Key[i + 1]);
                inB[i] = ROR(inB[i], Key[i]);
                swapBytes(ref inB, i, i + 1);
            }

        }
        void Decrypt10(ref byte[] inB, int i)
        {

            if (i < inB.Length - 2)
            {
                swapBytes(ref inB, i, i + 1);
                inB[i] = ROL(inB[i], Key[i]);
                reverseBytes(ref inB, Key[i], Key[i + 1]);
            }

        }
        void Encrypt11(ref byte[] inB, int i)
        {
            counter++;

            if (i < inB.Length - 1)
            {
                reverseBytes(ref inB, Key[i], Key[i + 1]);
                rotateArrayRight(ref inB);
            } 
        }
        void Decrypt11(ref byte[] inB, int i)
        {

            if (i < inB.Length - 1)
            {
                rotateArrayLeft(ref inB);
                reverseBytes(ref inB, Key[i], Key[i + 1]);
            }

        }

        void Encrypt12(ref byte[] inB, int i)
        {
            counter++;

            rotateArrayRightAsBits(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]); //xor				 
            rotateArrayRightAsBits(ref inB);
        }
        void Decrypt12(ref byte[] inB, int i)
        {

            counter++;
            rotateArrayLeftAsBits(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayLeftAsBits(ref inB);
        }
        void Encrypt13(ref byte[] inB, int i)
        { 
            counter++;

            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayRightAsBits(ref inB);
            inB[i] = (byte)((inB[i] << 7) | inB[i] >> 1);


        }
        void Decrypt13(ref byte[] inB, int i)
        { 
            inB[i] = (byte)((inB[i] >> 7) | inB[i] << 1);

            rotateArrayLeftAsBits(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]);


        }
        void Encrypt14(ref byte[] inB, int i)
        { 
            counter++;

            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayRight(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]);


        }
        void Decrypt14(ref byte[] inB, int i)
        { 
            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayLeft(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]);


        }
        void Encrypt50(ref byte[] inB, int i)
        {
            //take the first and last byte in the buffer
            counter++;
            if (inB.Length < 10) return;
            int j = (inB.Length / 2) - 3;
            for (int m = 0; m < j; m++)
            {
                byte a = inB[m];
                byte b = inB[j-m];
                inB[j - m] = a;
                inB[m] = b;
            }

        }
        void Decrypt50(ref byte[] inB, int i)
        {
            //take the first and last byte in the buffer
            if (inB.Length < 10) return;
            int j = (inB.Length / 2) - 3;
            for (int m = 0; m < j; m++)
            {
                byte a = inB[m];
                byte b = inB[j - m];
                inB[j - m] = a;
                inB[m] = b;
            } 
        }
   
        void Decrypt51(ref byte[] inB, int i)
        {
            //take the first and last byte in the buffer
            if (inB.Length < 10 || i < (inB.Length / 2) - 3) return;
            for (int m = 0; m < i; m++)
            {
                byte a = inB[m];
                byte b = inB[i - m];
                inB[i - m] = a;
                inB[m] = b;
            }


        }
        void Encrypt51(ref byte[] inB, int i)
        {
            counter++;
            //take the first and last byte in the buffer
            if (inB.Length < 10 || i < (inB.Length / 2) - 3) return;
           
            for (int m = 0; m < i; m++)
            {
                byte a = inB[m];
                byte b = inB[i - m];
                inB[i - m] = a;
                inB[m] = b;
            }


        }
        void Encrypt52(ref byte[] inB, int i)
        { 
            if (i < inB.Length-2) return;
           
            counter++;
            
            byte[] matrix = new byte[1];
            
            if (selectMatrix(ref matrix, ref inB, i) == false)
                    return;
                
            encrypt[Key[i]](ref matrix, i); //was keyPosition
                
                returnMatrix(ref matrix, ref inB, i); 
             
        }
        void Decrypt52(ref byte[] inB, int i)
        {
            if (i < inB.Length - 2) return;
           
            counter++;
            byte[] matrix = new byte[1];

            if (selectMatrix(ref matrix, ref inB, i) == false)
                return;
           
            decrypt[Key[i]](ref matrix, i); //was keyPosition
            returnMatrix(ref matrix, ref inB, i);
        }
            
        
        void Encrypt33(ref byte[] inB, int i)
        { 
            if (i >= inB.Length - 2) return; //since we get KeyPositon, keyPositon+1 and keyPosition+2
            counter++;
            byte[] matrix = new byte[1];
            if (selectMatrix(ref matrix, ref inB, i) == false)
                return;
            for (int j = 0; j < matrix.Length; j++)
            {
                if (34 <= Key[j] && Key[j] < 38) continue;
                encrypt[Key[j]](ref matrix, j);
            }
            returnMatrix(ref matrix, ref inB, i);
            
        }
        void Decrypt33(ref byte[] inB, int i)
        {
             
            if (i >= inB.Length - 2) return; //since we get KeyPositon, keyPositon+1 and keyPosition+2
            byte[] matrix = new byte[1];
            if (selectMatrix(ref matrix, ref inB, i) == false)
                return;
            for (int j = matrix.Length - 1; j >= 0; j--)
            {
                    if (34 <= Key[j] && Key[j] < 38) continue;
                    decrypt[Key[j]](ref matrix, j); //was keyPosition
                }
                returnMatrix(ref matrix, ref inB, i); 
        }
        void Encrypt15(ref byte[] inB, int i)
        {
            counter++;

            inB[i] = (byte)((inB[i] << 7) | inB[i] >> 1);


        }
        void Decrypt15(ref byte[] inB, int i)
        { 
            inB[i] = (byte)((inB[i] >> 7) | inB[i] << 1); 
        }
        void Decrypt16(ref byte[] inB, int i)
        {
            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayRight(ref inB);
            inB[i] = (byte)((inB[i] >> 7) | inB[i] << 1);

        }
        void Encrypt16(ref byte[] inB, int i)
        {
            counter++;

            inB[i] = (byte)((inB[i] << 7) | inB[i] >> 1);
            rotateArrayLeft(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]);

        }
        void Decrypt17(ref byte[] inB, int i)
        {
            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayRightAsBits(ref inB);
            inB[i] = (byte)((inB[i] >> 7) | inB[i] << 1);


        }
        void Encrypt17(ref byte[] inB, int i)
        {
            counter++;

            inB[i] = (byte)((inB[i] << 7) | inB[i] >> 1);
            rotateArrayLeftAsBits(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]); 
        }
        void Decrypt18(ref byte[] inB, int i)
        {

            inB[i] = (byte)(inB[i] ^ Key[i]);
            doReverseBytes(ref inB, i);
            inB[i] = (byte)((inB[i] >> 7) | inB[i] << 1);

        }
        void Encrypt18(ref byte[] inB, int i)
        {
            counter++;

            inB[i] = (byte)((inB[i] << 7) | inB[i] >> 1);
            doReverseBytes(ref inB, i);
            inB[i] = (byte)(inB[i] ^ Key[i]);

        }
        void Encrypt19(ref byte[] inB, int i)
        {
            counter++;

            AdjacentSwapEncrypt(ref inB);

        }
        void Decrypt19(ref byte[] inB, int i)
        {

            AdjacentSwapDecrypt(ref inB);

        }
        void Encrypt21(ref byte[] inB, int i)
        {
            counter++;

            if (i > inB.Length - 3) return;
            swapBlocks(ref inB, Key[i], Key[i + 1], Key[i + 2]);


        }
        void Decrypt21(ref byte[] inB, int i)
        {

            if (i > inB.Length - 3) return;
            swapBlocks(ref inB, Key[i], Key[i + 1], Key[i + 2]); 

        }
        void Encrypt22(ref byte[] inB, int i)
        {
            counter++;

            inB[i] = ROL(inB[i], i);
            rotateArrayRight(ref inB);
            inB[i] = (byte)(inB[i] ^ Key[i]);

        }
        void Decrypt22(ref byte[] inB, int i)
        {
            inB[i] = (byte)(inB[i] ^ Key[i]);
            rotateArrayLeft(ref inB);
            inB[i] = ROR(inB[i], i); 
        }
        void Encrypt30(ref byte[] inB, int i)
        {
            counter++;
            reverseBits(ref inB, i, (int)Key[i]);
        }
        void Decrypt30(ref byte[] inB, int i)
        {
            reverseBitsDecrypt(ref inB, i, (int)Key[i]);
        }
        void Encrypt27(ref byte[] inB, int k)
        {
            counter++;

            for (int j = 0; j < inB.Length; j++)
            {

                inB[j] = (byte)(inB[j] ^ Key[j]);
            }

        }
        void Decrypt27(ref byte[] inB, int k)
        {

            for (int j = 0; j < inB.Length; j++)
            {

                inB[j] = (byte)(inB[j] ^ Key[j]);
            }

        }
         public void Encrypt56(ref byte[] inB, int k)
        {

        }
        public void Decrypt56(ref byte[] inB, int k)
        {
            if (k >= Key.Length - 1) return;
            byte[] temp = selectBytesRange(ref inB, Key[k]);

            if (temp == null) return;
            if (temp.Length % 8 == 0)
            {

                // returnBytes(ref inB, ref temp, Key[k]);
                returnBytesRange(ref inB, Key[k], ref temp);
            }

        }
        public void Encrypt54(ref byte[] inB, int k)
        {
            if (k >=Key.Length-1) return;

            byte[] matrix = new byte[1];
              if (selectMatrix(ref matrix, ref inB, k) == true)
                {
                    if (matrix.Length % 8 == 0)
                    {
                        new Blowfish(Key).Encipher(matrix, matrix.Length);
                        returnMatrix(ref matrix, ref inB, k);
                    }
                } 
        }
       
        public void Decrypt54(ref byte[] inB, int k)
        {
           if (k >=Key.Length-1) return;
            byte[] matrix = new byte[1];
            if (selectMatrix(ref matrix, ref inB, k) == true)
            
                if (matrix.Length % 8 == 0)
                {
                    new Blowfish(Key).Decipher(matrix, matrix.Length);
                    returnMatrix(ref matrix, ref inB, k);
                }
        }


        delegate void Encrypt(ref byte[] inB, int i);
        delegate void Decrypt(ref byte[] inB, int i);
        Encrypt[] encrypt = new Encrypt[256];
        Decrypt[] decrypt = new Decrypt[256];

        #endregion

        #region Public Methods

       public void actOnArrayE(ref byte[] inB)
        {
            rotateArrayLeftAsBits(ref inB);
            negateArray(ref inB);

        }
        public void actOnArrayD(ref byte[] inB)
        {
            negateArray(ref inB);
            rotateArrayRightAsBits(ref inB);
        }
        //entry point from Yull.cs
        public void EncryptStart()
        { 
            if (createLongKey(ref Key, inBuff.Length) == false) return;
                 
            dispatcherEncrypt(ref inBuff);  
        }
        //entry point from Yull.cs
        public void DecryptStart()
        {  
            if (createLongKey(ref Key, inBuff.Length) == false) return;
                
            dispatcherDecrypt(ref inBuff);
        }

        public void initializeDelegateArray(bool bEncrypt, int Number)//nuber is SecretKeySave[outerRead]
        //create the array of delegate objects, called by dispatchEncrypt and dispatchDecrypt  
         
        {
            
            if (bEncrypt == true)
            {
                for (int i = 0; i <= 255; i++)
                {
                    if (i < 5)             encrypt[i] = new Encrypt(Encrypt35); //WAS 53
                    if (5 <= i && i < 10)  encrypt[i] = new Encrypt(Encrypt53);
                    if (10 <= i && i < 15) encrypt[i] = new Encrypt(Encrypt52); // 
                    if (15 <= i && i < 20) encrypt[i] = new Encrypt(Encrypt26);       
                    if (20 <= i && i < 24) encrypt[i] = new Encrypt(Encrypt2);
                    if (24 <= i && i < 27) encrypt[i] = new Encrypt(Encrypt32);  //added 10/28/13
                    if (27 <= i && i < 31) encrypt[i] = new Encrypt(Encrypt25);
                    if (31 <= i && i < 34) encrypt[i] = new Encrypt(Encrypt1);
                    if (34 <= i && i < 38) encrypt[i] = new Encrypt(Encrypt33);
                    if (38 <= i && i < 42) encrypt[i] = new Encrypt(Encrypt36);
                    if (42 <= i && i < 47) encrypt[i] = new Encrypt(Encrypt16);
                    if (47 <= i && i < 53) encrypt[i] = new Encrypt(Encrypt3);
                    if (53 <= i && i < 60) encrypt[i] = new Encrypt(Encrypt37);
                    if (60 <= i && i < 63) encrypt[i] = new Encrypt(Encrypt4);
                    if (63 <= i && i < 67) encrypt[i] = new Encrypt(Encrypt57);
                    if (67 <= i && i < 70) encrypt[i] = new Encrypt(Encrypt43); //10/16/2013
                    if (70 <= i && i < 75) encrypt[i] = new Encrypt(Encrypt24);
                    if (75 <= i && i < 80) encrypt[i] = new Encrypt(Encrypt38);
                    if (80 <= i && i < 85) encrypt[i] = new Encrypt(Encrypt5);
                    if (85 <= i && i < 90) encrypt[i] = new Encrypt(Encrypt46); //10/28/13 negate
                    if (90 <= i && i < 95) encrypt[i] = new Encrypt(Encrypt28);
                    if (95 <= i && i < 100) encrypt[i] = new Encrypt(Encrypt39);
                    if (100 <= i && i < 103) encrypt[i] = new Encrypt(Encrypt6);
                    if (103 <= i && i < 106) encrypt[i] = new Encrypt(Encrypt60);
                    if (106 <= i && i < 110) encrypt[i] = new Encrypt(Encrypt59);
                    if (110 <= i && i < 112) encrypt[i] = new Encrypt(Encrypt45);
                    if (112 <= i && i < 115) encrypt[i] = new Encrypt(Encrypt40);
                    if (115 <= i && i < 120) encrypt[i] = new Encrypt(Encrypt20); //10/17/2013
                    if (120 <= i && i < 125) encrypt[i] = new Encrypt(Encrypt7);
                    if (125 <= i && i < 130) encrypt[i] = new Encrypt(Encrypt41);  //10/16/2013
                    if (130 <= i && i < 135) encrypt[i] = new Encrypt(Encrypt23);
                    if (135 <= i && i < 140) encrypt[i] = new Encrypt(Encrypt31);
                    if (140 <= i && i < 145) encrypt[i] = new Encrypt(Encrypt47);
                    if (145 <= i && i < 150) encrypt[i] = new Encrypt(Encrypt8);  //ADDING ENCRYPTX13 here; it does seem to work 9/24/2013
                    if (150 <= i && i < 155) encrypt[i] = new Encrypt(Encrypt13);
                    if (155 <= i && i < 160) encrypt[i] = new Encrypt(Encrypt9);
                    if (160 <= i && i < 165) encrypt[i] = new Encrypt(Encrypt10); //ADDING ENCRYPTX38
                    if (165 <= i && i < 170) encrypt[i] = new Encrypt(Encrypt42); //added 10/28/13 not sure why not before.
                    if (170 <= i && i < 175) encrypt[i] = new Encrypt(Encrypt11);
                    if (175 <= i && i < 180) encrypt[i] = new Encrypt(Encrypt54);
                    if (180 <= i && i < 185) encrypt[i] = new Encrypt(Encrypt12);
                    if (185 <= i && i < 190) encrypt[i] = new Encrypt(Encrypt14);
                    if (190 <= i && i < 195) encrypt[i] = new Encrypt(Encrypt15);
                    if (195 <= i && i < 200) encrypt[i] = new Encrypt(Encrypt34); //WAS 39 where's 34?? JUST TESTING*************************************
                    if (200 <= i && i < 205) encrypt[i] = new Encrypt(Encrypt17);
                    if (205 <= i && i < 210) encrypt[i] = new Encrypt(Encrypt30);
                    if (210 <= i && i < 215) encrypt[i] = new Encrypt(Encrypt44);
                    if (215 <= i && i < 220) encrypt[i] = new Encrypt(Encrypt18);  
                    if (220 <= i && i < 225) encrypt[i] = new Encrypt(Encrypt51); //11/27/2013
                    if (225 <= i && i < 230) encrypt[i] = new Encrypt(Encrypt19); 
                    if (230 <= i && i < 235) encrypt[i] = new Encrypt(Encrypt21);
                    if (235 <= i && i < 240) encrypt[i] = new Encrypt(Encrypt29);
                    if (240 <= i && i < 243) encrypt[i] = new Encrypt(Encrypt22);
                    if (243 <= i && i < 246) encrypt[i] = new Encrypt(Encrypt58);
                    if (246 <= i && i < 250) encrypt[i] = new Encrypt(Encrypt27);
                    if (250 <= i && i <= 255) encrypt[i] = new Encrypt(Encrypt50); //was 54


                }
            }
            else
            {
                for (int i = 0; i <= 255; i++)
                {
                    if (i < 5)              decrypt[i] = new Decrypt(Decrypt35); //WAS 53
                    if (5 <= i && i < 10)   decrypt[i] = new Decrypt(Decrypt53);
                    if (10 <= i && i < 15)  decrypt[i] = new Decrypt(Decrypt52); // 
                    if (15 <= i && i < 20)  decrypt[i] = new Decrypt(Decrypt26);                    
                    if (20 <= i && i < 24)  decrypt[i] = new Decrypt(Decrypt2);
                    if (24 <= i && i < 27)  decrypt[i] = new Decrypt(Decrypt32);  //added 10/28/13
                    if (27 <= i && i < 31)  decrypt[i] = new Decrypt(Decrypt25);
                    if (31 <= i && i < 34)  decrypt[i] = new Decrypt(Decrypt1);
                    if (34 <= i && i < 38)  decrypt[i] = new Decrypt(Decrypt33);
                    if (38 <= i && i < 42)  decrypt[i] = new Decrypt(Decrypt36);
                    if (42 <= i && i < 47)  decrypt[i] = new Decrypt(Decrypt16);
                    if (47 <= i && i < 53)  decrypt[i] = new Decrypt(Decrypt3);
                    if (53 <= i && i < 60)  decrypt[i] = new Decrypt(Decrypt37);
                    if (60 <= i && i < 63)  decrypt[i] = new Decrypt(Decrypt4);
                    if (63 <= i && i < 67)  decrypt[i] = new Decrypt(Decrypt57);
                    if (67 <= i && i < 70)  decrypt[i] = new Decrypt(Decrypt43);
                    if (70 <= i && i < 75)  decrypt[i] = new Decrypt(Decrypt24);
                    if (75 <= i && i < 80)  decrypt[i] = new Decrypt(Decrypt38);
                    if (80 <= i && i < 85)  decrypt[i] = new Decrypt(Decrypt5);
                    if (85 <= i && i < 90)  decrypt[i] = new Decrypt(Decrypt46); //10/28/13
                    if (90 <= i && i < 95)   decrypt[i] = new Decrypt(Decrypt28);
                    if (95 <= i && i < 100)  decrypt[i] = new Decrypt(Decrypt39);
                    if (100 <= i && i < 103) decrypt[i] = new Decrypt(Decrypt6);
                    if (103 <= i && i < 106) decrypt[i] = new Decrypt(Decrypt60);
                    if (106 <= i && i < 110) decrypt[i] = new Decrypt(Decrypt59);
                    if (110 <= i && i < 112) decrypt[i] = new Decrypt(Decrypt45);
                    if (112 <= i && i < 115) decrypt[i] = new Decrypt(Decrypt40);
                    if (115 <= i && i < 120) decrypt[i] = new Decrypt(Decrypt20);
                    if (120 <= i && i < 125) decrypt[i] = new Decrypt(Decrypt7);
                    if (125 <= i && i < 130) decrypt[i] = new Decrypt(Decrypt41); //10/16/2013  
                    if (130 <= i && i < 135) decrypt[i] = new Decrypt(Decrypt23);
                    if (135 <= i && i < 140) decrypt[i] = new Decrypt(Decrypt31);
                    if (140 <= i && i < 145) decrypt[i] = new Decrypt(Decrypt47); 
                    if (145 <= i && i < 150) decrypt[i] = new Decrypt(Decrypt8);
                    if (150 <= i && i < 155) decrypt[i] = new Decrypt(Decrypt13);
                    if (155 <= i && i < 160) decrypt[i] = new Decrypt(Decrypt9);
                    if (160 <= i && i < 165) decrypt[i] = new Decrypt(Decrypt10);
                    if (165 <= i && i < 170) decrypt[i] = new Decrypt(Decrypt42);
                    if (170 <= i && i < 175) decrypt[i] = new Decrypt(Decrypt11);
                    if (175 <= i && i < 180) decrypt[i] = new Decrypt(Decrypt54);
                    if (180 <= i && i < 185) decrypt[i] = new Decrypt(Decrypt12);
                    if (185 <= i && i < 190) decrypt[i] = new Decrypt(Decrypt14);
                    if (190 <= i && i < 195) decrypt[i] = new Decrypt(Decrypt15);
                    if (195 <= i && i < 200) decrypt[i] = new Decrypt(Decrypt34); // 
                    if (200 <= i && i < 205) decrypt[i] = new Decrypt(Decrypt17);
                    if (205 <= i && i < 210) decrypt[i] = new Decrypt(Decrypt30); // 
                    if (210 <= i && i < 215) decrypt[i] = new Decrypt(Decrypt44);
                    if (215 <= i && i < 220) decrypt[i] = new Decrypt(Decrypt18); //TWO 18??????
                    if (220 <= i && i < 225) decrypt[i] = new Decrypt(Decrypt51); //11/27/2013
                    if (225 <= i && i < 230) decrypt[i] = new Decrypt(Decrypt19);
                    if (230 <= i && i < 235) decrypt[i] = new Decrypt(Decrypt21);
                    if (235 <= i && i < 240) decrypt[i] = new Decrypt(Decrypt29);
                    if (240 <= i && i < 243) decrypt[i] = new Decrypt(Decrypt22);
                    if (243 <= i && i < 246) decrypt[i] = new Decrypt(Decrypt58);
                    if (246 <= i && i < 250) decrypt[i] = new Decrypt(Decrypt27);
                    if (250 <= i && i <=255) decrypt[i] = new Decrypt(Decrypt50);  ///was 54******************

                }

            }

        } 

        public void clearDelegateArray()
        {
            for (int i = 0; i < 256; i++)
            {
                encrypt[i] = null;
                decrypt[i] = null;
            }

        }
        public void dispatcherEncrypt(ref byte[] inB)
        { 
            for (int i = 0; i < Key.Length; i++)
            {
               encrypt[Key[i]](ref inB, i); 
            }  
                   
        }
        void dispatcherDecrypt(ref byte[] inB)
        {
            for (int i = Key.Length - 1; i >= 0; i--)
            { 
               decrypt[Key[i]](ref inB, i); 
            }
        }


        #endregion

         
    }

About the Author

I have been a self-taught developer since the mid-1980s, starting with assembly language, C, and C++. I worked for Ashton-Tate (dBase), Chase (Chemical), Random House, Logitech, and AXA Financial, and other companies as well. I moved from C and C++ to C# and VB.NET.

I started working on Yull in 2005 for my own amusement. I was interested to see how much I could scramble data and then unscramble it. In 2013, after adding some features, I was curious as to how many encrypt functions were called so I put a counter at the beginning of each encrypt function where the code actually enters the body of the function. During a run with a 70K file. I expected a few thousand but I got about fifty million. For one file of about 600K I got over 250 billion encrypts. It was at that point I decided to dedicate the majority of my time to developing Yull.

Ronald Gans
New York, New York
May 25, 2015
help@yullencryption.com

Everything on this website is Copyright © 2015 Ronald Gans / Yull Encryption Company, LLC.
All Rights Reserved.