System.Security.Cryptography.ToBase64Transform.ConvertToBase64 C# (CSharp) Method

ConvertToBase64() private method

private ConvertToBase64 ( byte inputBuffer, int inputOffset, int inputCount ) : byte[]
inputBuffer byte
inputOffset int
inputCount int
return byte[]
        private byte[] ConvertToBase64(byte[] inputBuffer, int inputOffset, int inputCount)
        {
            char[] temp = new char[4];
            Convert.ToBase64CharArray(inputBuffer, inputOffset, inputCount, temp, 0);
            byte[] tempBytes = Encoding.ASCII.GetBytes(temp);
            if (tempBytes.Length != 4)
                throw new CryptographicException(SR.Cryptography_SSE_InvalidDataSize);

            return tempBytes;
        }