Re: Encrypted Data over Sockets

2022-07-09 Thread Mark Wieder via use-livecode
On 7/8/22 19:47, Bob Sneidar via use-livecode wrote: Okay apparently base64Encode/Decode is my friend. I have this working now without encryption. I will re-enable encryption and see if that works. Base64 encoding will do the trick but at the expense of making your data strings twice as long

Re: Encrypted Data over Sockets

2022-07-08 Thread Bob Sneidar via use-livecode
Hi all. Thanks for putting up with me. I finally got it all to work using base64Encode/Decode on the encrypted string before sending it with a delimiter appended. Same thing coming back. Thank for all your patience. I almost became a patient myself. Bob S > On Jul 8, 2022, at 19:14 , Bob

Re: Encrypted Data over Sockets

2022-07-08 Thread Bob Sneidar via use-livecode
Okay apparently base64Encode/Decode is my friend. I have this working now without encryption. I will re-enable encryption and see if that works. Bob S > On Jul 8, 2022, at 19:14 , Bob Sneidar via use-livecode > wrote: > > It looks after the agent receives it generally like how it looked aft

Re: Encrypted Data over Sockets

2022-07-08 Thread Bob Sneidar via use-livecode
It looks after the agent receives it generally like how it looked after I encoded the array but before I sent it. Obviously it's not the same. Something is corrupting it over the wire. I am not even using encryption now, just sending the encoded array data and a delimiter. When it decodes on the

Re: Encrypted Data over Sockets

2022-07-08 Thread Mark Wieder via use-livecode
On 7/8/22 17:47, Alex Tweedly via use-livecode wrote: But, an encoded array is STILL binary data. So any issues with "read until linefeed" will still exist. Try sending a header with number of bytes, followed by the bytes. Yeah. What he said. -- Mark Wieder ahsoftw...@gmail.com __

Re: Encrypted Data over Sockets

2022-07-08 Thread Mark Wieder via use-livecode
On 7/8/22 16:49, Bob Sneidar via use-livecode wrote: Well I disabled encryption alltogether, sending and receiving an encoded array instead. Upon trying to decode I still get an error, and looking at what I get back, it LOOKS like an encoded array. They is just something wrong with the data. C

Re: Encrypted Data over Sockets

2022-07-08 Thread Alex Tweedly via use-livecode
But, an encoded array is STILL binary data. So any issues with "read until linefeed" will still exist. Try sending a header with number of bytes, followed by the bytes. If you really wanted, you could do:    write  (the number of bytes in tSocketData) & linefeed to socket tSocket    write tSoc

Re: Encrypted Data over Sockets

2022-07-08 Thread Bob Sneidar via use-livecode
Well I disabled encryption alltogether, sending and receiving an encoded array instead. Upon trying to decode I still get an error, and looking at what I get back, it LOOKS like an encoded array. They is just something wrong with the data. Curiously, if I just send and receive plain text it work

Re: Encrypted Data over Sockets

2022-07-08 Thread Mark Wieder via use-livecode
On 7/8/22 16:14, Bob Sneidar via use-livecode wrote: My suspicion is that the hash contains a linefeed (sometimes). So the question I have is, what character is GUARANTEED to NOT be in an aes256 hash? Not a valid question. If you really need to send binary data over a socket connection, star

Encrypted Data over Sockets

2022-07-08 Thread Bob Sneidar via use-livecode
Hi all. I'm running into a curious thing. I am sending encrypted data over a socket connection. When I send the data, I am using blocking mode, where the commands look like this: if tCurrentConnectionA ["ssl"] is true then put slyEncrypt(tSocketData) into tSocketData