attempt to decode a value not in base64 char set

后端 未结 3 679
故里飘歌
故里飘歌 2020-12-12 05:21

I am using the following code snippet to base64 encode and decode a string using Boost C++ library.

//Base64 Encode Implementation using Boost C++ library
con         


        
3条回答
  •  情歌与酒
    2020-12-12 06:00

    The padding characters '=' are part of the b64 encoded data and should not be removed before decoding. b64 is encoded in blocks of 4 character, I suspect that while decoding it reads a '\0' instead of an expected '=' at the end of the string.

提交回复
热议问题