BASE64 decode error,msg=Illegal base64 character a
turn out to bejava.util.Base64 This method is wrong, resulting in,decodemistake!
Solution
The reason for this problem is that during the BASE64 encryption process, the wrong jar package is introduced, and the internal package provided by Sun should not be used. That is, it was later learned that the package is a dedicated API provided by Sun for internal use. We cannot see any shadows about BASE64 in the java API documentation, so it is not recommended to use it.
After testing, I found that except for the BASE64 error using the package, the other two can run normally, including:
- .Base64;
- .Base64;
Both of these provided implementations work properly. As for the encryption methods of these two, please go to Baidu. . .