What causing this “Invalid length for a Base-64 char array”

前端 未结 12 2045
走了就别回头了
走了就别回头了 2020-11-28 02:56

I have very little to go on here. I can\'t reproduce this locally, but when users get the error I get an automatic email exception notification:



        
12条回答
  •  星月不相逢
    2020-11-28 03:32

    int len = qs.Length % 4;
                if (len > 0) qs = qs.PadRight(qs.Length + (4 - len), '=');
    

    where qs is any base64 encoded string

提交回复
热议问题