Encrypting long text

Mark Waddingham mark at livecode.com
Thu Dec 16 12:36:46 EST 2021


On 2021-12-16 17:09, Sean Cole via use-livecode wrote:
> Thanks Mark,
> 
> New problem. Trying to use aes-256-ctr instead. I'm following the 
> syntax in
> the dictionary but it throws a red cross on it:
> 
> encrypt tData using "aes-256-ctr" with key tMyKey and salt tMySalt

I think you can either specify a key, or a password with an optional 
salt.

If you specify a password it uses the provided salt (or a random one if 
one is not provided) to generate a key of the correct length (the bit 
length of the cipher).

If you provide a key then it uses that verbatim to encrypt the data (in 
this case the key must be the correct number of bits as defined by the 
chosen cipher - 256 in this case).

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps



More information about the use-livecode mailing list