Jump to content
Sign in to follow this  
CraigA

_StringEncrypt()'s Return String

Recommended Posts

CraigA

Hello,

I have read and experienced that only strings with printable (a.k.a non-white space) characters are valid as values in an .ini file.

I would like to use the string returned by _StringEncyrpt in an .ini file for the value of a key/value pair.

Example with level "1" encryption:

[PASSWORDS]

PREV_PW=357F6147340530645379

CURR_PW=35096341360532195176

Does _StringEncrypt() always return a printable string if the same password and level is used for encryption and subsequent decryption?

Maybe a better question: what is the range of characters that might be returned in the string?

I have tested a bit with the _StringEncrypt.au3 example and, so far, only printable characters (all caps) are returned. I just don't know if I am getting lucky. I've observed that if I accidentally use an incorrect password, the decrypted string may contain strange symbols.

Share this post


Link to post
Share on other sites
PsaltyDS

It's string representations of a long hex number. The characters 0 thru 9 and A thru F are all you'll get. If you are concerned with stray characters, use StringIsAlNum() to test the returned string before using it.

:rolleyes:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
CraigA

It's string representations of a long hex number. The characters 0 thru 9 and A thru F are all you'll get. <snip>

Excellent.

Thanks for the quick reply.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×