private byte[] ConvertFromBase64(byte[] temp, int effectiveCount)
{
// Get the number of 4 bytes blocks to transform
int numBlocks = (effectiveCount + _inputIndex) / 4;
byte[] transformBuffer = new byte[_inputIndex + effectiveCount];
Buffer.BlockCopy(_inputBuffer, 0, transformBuffer, 0, _inputIndex);
Buffer.BlockCopy(temp, 0, transformBuffer, _inputIndex, effectiveCount);
_inputIndex = (effectiveCount + _inputIndex) % 4;
Buffer.BlockCopy(temp, effectiveCount - _inputIndex, _inputBuffer, 0, _inputIndex);
char[] tempChar = Encoding.ASCII.GetChars(transformBuffer, 0, 4 * numBlocks);
byte[] tempBytes = Convert.FromBase64CharArray(tempChar, 0, 4 * numBlocks);
return tempBytes;
}