Encryption / Encoding Differences between IDE and OS X Standalone

Peter W A Wood peterwawood at gmail.com
Wed Feb 19 21:27:44 EST 2014


Roger

I'm pretty certain that I did. The first time I build the standalone, I used the "search for ..." option. The second time I specifically included the ssl & encryption lib. 

Regards

Peter
http://LiveCode1001.blogspot.com

On 20 Feb 2014, at 10:23, Roger Eller wrote:

> In standalone application settings, are you including ssl & encryption?
> 
> ~Roger
> On Feb 19, 2014 9:20 PM, "Peter W A Wood" <peterwawood at gmail.com> wrote:
> 
>> I've written a very simple stack to encrypt or decrypt some text. There
>> are two fields (In and Out) and two buttons (Encrypt and Decrypt). When I
>> encrypt test in the IDE and then paste the encrypted text from the Out
>> field to the In field and then decrypt it, I get the back the original
>> text. But not in an OS X Standalone. From a few experiments, I suspect that
>> the issue is related to displaying the encrypted text, probably an encoding
>> issue.
>> 
>> I'm using LiveCode 6.5.2 under OS X 10.7.5
>> 
>> Here is my script:
>> 
>> local tData
>> local tDisplay
>> local tPassword
>> local tSalt
>> local tIV
>> 
>> on openStack
>>   put the sha1Digest of "My Old Password" into tPassword
>>   put "12345678" into tSalt
>>   put "1234567890123456" in tIV
>> end openStack
>> 
>> on encryptMSG
>>   put Field "In" into tData
>>   encrypt tData using "aes256" with password tPassword and salt tSalt and
>> IV tIV
>>   put it into tDisplay
>>   delete char 1 to 16 of tDisplay
>>   put tDisplay into Field "Out"
>> end encryptMSG
>> 
>> on decryptMSG
>>   put Field "In" into tData
>>   decrypt tData using "aes256" with password tPassword and salt tSalt and
>> IV tIV
>>   put it into Field "Out"
>> end decryptMSG
>> 
>> When I copy the encrypted text from the OS X standalone into a text editor
>> (or even Mail), it displays differently (hence my suspicion that this is an
>> encoding issue.
>> 
>> I appreciate any suggestions as to where I am going wrong.
>> 
>> Thanks
>> 
>> Peter
>> http://LiveCode1001.blogspot.com
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list