Encoding Arrays with File Paths

Mark Waddingham mark at livecode.com
Wed Feb 19 23:45:29 EST 2025


On 2025-02-18 23:18, Bob Sneidar via use-livecode wrote:
> The structure looks like the following:
> 
> I reverse the process on the receiving side. It seems to work if I send 
> non-binary data in the [“data”] key but if the data is binary, it 
> fails. I do not think arrayEncode / decode likes to work with binary 
> data.

I think the problem here is with encrypt/decrypt - there is an anomaly 
in that although the operations morally work on binary strings, their 
internal signatures (in the engine) take and return normal strings.

This doesn't make any difference if you are saving the data to a binary 
file or working on the same platform - but it does make a difference if 
you store the value in something which records the difference between 
strings and binary strings - like arrayEncode.

If you put `byte 1 to -1 of tEncryptedData into tArray["key"]` then it 
should solve the problem as the engine won't be doing any (native) 
encoding translation when you pass the data to decrypt on a different 
platform.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Build Amazing Things



More information about the use-livecode mailing list