AESEncrypt> function

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
hagchr
Automation Wizard
Posts: 331
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

AESEncrypt> function

Post by hagchr » Mon May 16, 2016 8:29 pm

I tried the AESEncrypt> example from the help page and note that when the string to encode is less than 16 characters, I get the clear text back independent on what decode password I use? Is that a bug or does the function require at least 16 character strings to work? ... or am I missing something else?

Code: Select all

Let>AES_LEGACY=1

//Create a password
Let>mypassword1=ABCDEFGHI
Let>mypassword2=123456789

Let>strText=the quick brown
//Let>strText=the quick brown fox jumped over the lazy dog
 
//encrypt the string with AES
AESEncrypt>strText,mypassword1,ENCRYPT,encrypted_data
 
//as encrypted data is binary use Base64 to encode it to a string
Base64>encrypted_data,ENCODE,encoded_encrypted_data
 
//decode and decrypt
Base64>encoded_encrypted_data,DECODE,encrypted_data
AESEncrypt>encrypted_data,mypassword2,DECRYPT,strText2

MDL>strText2

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: AESEncrypt> function

Post by Marcus Tettmar » Tue May 17, 2016 10:29 am

I've tested this and can confirm your findings but only in legacy mode. Will investigate further.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts