Jump to content

AesEncrypted shortend


Deye
 Share

Recommended Posts

Hi,

I'm looking for some easy way to get an AesEncrypted string (AES Machine Code UDF) to a shorter string so it will convert and look more like some activation code ####-####-####-####-####

so it will also convert back easily to the original 

since i cannot wrap my head around doing it just now i wonder how this can be achieved and would like to know of any ideas if at all possible

just for example some long string

$s = "0x29CB20316953B0DBC5CD19A47712B0F3DEE99CE52F6212D0944E0AA261E4F22998E5786AE78E48D7CFE4E9B15FABAEBE737D0CF6285EF7995609B10B09A69402B2F98DFB8D51C1437A6B6CA4002DFDC6-0x0B8AF2688AD541E53EE0DBBCA10849F75D3C13D754EA4F5411F198E94AEB3D970D4C8B5F3616C8216478F8F223F96B54"

Thanks

Edited by Deye
Link to comment
Share on other sites

Things encrypted using a non-nonsensical encryption method will always be as random as random can be.  That implies you can't compress it without loosing significant information, that in turn means what you have in mind is plain impossible.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

I thought that this will offer to convert 4 characters to 2 characters , seems i missed the point of characters conversion completely 

didn't think it through yet :unsure:

but i'm suspecting it wont be possible as you warmly suggested 

#include <Array.au3>
$s = "29CB20316953B0DBC5CD19A47712B0F3DEE99CE52F6212D0944E0AA261E4F22998E5786AE78E48D7CFE4E9B15FABAEBE737D0CF6285EF7995609B10B09A69402B2F98DFB8D51C1437A6B6CA4002DFDC6"
$a = StringRegExp($s, ".{4}", 3)
;~ _ArrayDisplay($a)

For $i = 0 To UBound($a) - 1
    $a[$i] = Asc($a[$i])
Next
_ArrayDisplay($a)

For $i = 0 To UBound($a) - 1
    $a[$i] = Chr($a[$i])
Next
_ArrayDisplay($a)

 

Edited by Deye
Link to comment
Share on other sites

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...