Encoding a decoded Base64 results in difference?

0
Hi guys I make use of the base64 java action of the community commons to encode/decode string values. 1 - In the documentation the base 64 encoded value is : eyJpc3MiOiI3NjEzMjY3OTgwNjktcjVtbGpsbG4xcmQ0bHJiaGc3NWVmZ2lncDM2bTc4ajVAZGV2ZWxvcGVyLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJzY29wZSI6Imh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvcHJlZGljdGlvbiIsImF1ZCI6Imh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL29hdXRoMi92NC90b2tlbiIsImV4cCI6MTMyODU1NDM4NSwiaWF0IjoxMzI4NTUwNzg1fQ 2 - When I decode this to a string value, I do get the string value as JSON. 3 - But when I encode the JSON  to base 64 value; then I get another base 64 encoded value then in 1. I understand that this has to do with the UTF16 vs UTF8 serialization of the bytes. Older topic did not apply to the current base64 actions (inlcuding a parameter to getBytes()).   So I am wondering how I can get the encoding same as the initial encoded valuex, something like a utf8 base 64 decoder/encoder instead of this one which is probably the utf16 verison?
asked
2 answers
1

If I decode your Base64 and encode it back, the difference I see are the spacing characters (= sign), which are optional. Maybe that causes the difference? If not: what do you get?

answered
0

i figured out myself, the commons base64 decoder/encoder is not the base64URL encoder, use that

answered