.net - What causing this "Invalid length for a Base-64 char array" - Stack Overflow
In addition to @jalchr's solution that helped me, I found that if calling ATL::Base64Encode from a c++ application to encode the content you pass to an ASP.NET webservice, then in addition to @jalchr 's solution; sEncryptedString = sEncryptedString ......