DecodeBase64 question

Any idea what this means ? and is XOJO DecodeBase64 knowing how to do that ?

If true, all encryptable fields have to be in base 64 with padding

thanks

Where did you see this?

a project that i’m working on, the question is does XOJO know how to do that or is there a way to have that with XOJO code ? no idea what that padding means.

After a quick test, it looks like EncodeBase64 does pad, where it add’s ='s at the end to make the last block contain 4 characters.

Yes. Technically that padding is optional as it can be assumed during decoding, but @Aurelian_N 's use case seems to demand it.

The short answer is, EncodeBase64 might be what is needed. Or maybe EncodeBase64( value, 0 ) if there should be no line breaks.

thanks guys, well in my case the data is already encoded , i need to decode it, so far i discovered that it has some weird Latin1 encoding so i used DecodeBase64(text, Encodings.ISOLatin1) so far i get better data but still gebrish characters there but i assume that it’s from some proprietary data maybe

If you can post the bytes in the string you’re receiving as hex, we might be able to help.

This or DecodeBase64(text) should not matter, Base64 uses pure ASCII sets common to all those encodings. Your problem probably lies in the content AFTER decoded.

Based on the possibility of being Latin1, maybe you need a

x = DecodeBase64(text).DefineEncoding(Encodings.ISOLatin1) ?

If UTF-8:

x = DecodeBase64(text).DefineEncoding(Encodings.UTF8)