Example #1
0
                private void InitDecoder(char[] input)
                {
                    Base64Encoding.BuidLookupTableDictionnary();
                    input = Base64Encoding.DeleteUnvalidChars(input);

                    int temp = 0;

                    source = input;
                    length = input.Length;

                    for (int i = 0; i < 2; i++)
                    {
                        if (input[length - i - 1] == '=')
                        {
                            temp++;
                        }
                    }
                    paddingCount = temp;
                    blockCount   = length / 4;
                    length2      = blockCount * 3;
                }
Example #2
0
 public MemoryBase64Encoder(string input, Encoding v)
 {
     byte[] inputBytes = v.GetBytes(Base64Encoding.DeleteUnvalidChars(input.ToCharArray()));
     this.InitEncoder(inputBytes);
 }