Jump to content
Sign in to follow this  
anhyeuem

I will post my question after i completed autoit at my school.

Recommended Posts

anhyeuem

I will post my question after i completed autoit at my school.

Edited by kid1519

Share this post


Link to post
Share on other sites
TechCoder

depending on your encryption technique, you may have to break long strings into segments, encrypt each, then tie the string back together.  One of the UDFs I found on this forum has a limit to 16 characters, which makes it more difficult to deal with, but once the programs are written to encrypt and decrypt, the length of string really doesn't matter too much (though there will be more processing time used, so balance things as best you can).

It is actually not a bad idea to keep strings small to encrypt then tie back together in a 'bundle' - it makes it a degree of difficulty harder for someone to decrypt it.  I would further suggest you vary the length of the breaks and rarely (if ever) break out a key pieces of data to encrypt by itself (as discussed in the other thread, say, for instance, you are going to grab the UUID, drive info, motherboard, etc. of a computer, you should tie them together, then break in various locations, encrypt each and put it all back into one string.)

Example (not all the code, but the comments!)

; gather data that we want to encrypt (UUID, drive info, motherboard in this example)

; get UUID

$UUID = (function to get the UUID)

; get disk drive info

$DriveInfo = (function to get the drive info)

; get computer board number

$CompBoardNo = (function to get that data)

Now, say we have

$UUID (10 characters)

$DriveInfo (15 characters)

$CompBoardNo (8 characters)

; put them all together in one string

$sStringToEncrypt = $UUID & $DriveInfo & $CompBoardNo

; break the string into small groups (if you make this various sizes, you will be more 'secure' (somewhat more difficult to decrypt/understand)

For this example, let's divide it into 4 parts(i.e., we decided not to use the above option - see how it is up to you how 'difficult' you want to make things and it will give a different result!)

There's 33 characters total, so 4 parts would be 3 with 8 and one with 9 characters (already different lengths)

; encrypt each part

$eString1 = _my_encrypt_function($sString1_toencrypt)

$eString2 = _my_encrypt_function($sString2_toencrypt)

$eString3 = _my_encrypt_function($sString3_toencrypt)

$eString4 = _my_encrypt_function($sString4_toencrypt)

 
; put them back together
$eStringToProcessFurther = $eString1 & $eString2 & $eString3 & $eString4
 
to decrypt, just reverse the process.
  • Like 1

Share this post


Link to post
Share on other sites
anhyeuem

I will post my question after i completed autoit at my school.

Edited by kid1519

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  

×