There are actually some really good encryption algorithms for wc3 that you could use in this (granted you rewrite them in Galaxy or w/e). There are also some new compression techniques =).
Also, it might be smart to run this on something like a BigInt. Rather than doing math with strings, you can do it with arrays digit by digit ; ). That'll truly pack as much data as possible into the code ; P.
Furthermore, look at Encoder's tree structure. StarCode could be drastically improved by moving to a tree structure =).
And Scrambler would work on numbers like 60 with passwords that were the same towards the start ;P. It also scrambles better since it scrambles in a set of different bases.
There are still many improvements that can be made to your resource ;p.
Could you generate a set of keys based on a cipher and encrypt the thing with those keys?
Here is my precise thought-
you have your base (like base 87)
You have a cipher (like the person's account name)
For each character of the code, you do an algorithm using the current base and the cipher
For example, first base would be a base derived from the default base and the cipher and applied to character 1 of the code. The next base would be derived from the previous base and the cipher and applied to character 2, etc.
After this point, you do shuffling by putting the code into a uniform matrix + a linear matrix (anything extra after uniform is just put into the line). You go in steps of 2x2 matrices and rotate each one clockwise/counter clockwise (including the linear matrix, which would make each matrix like a 2x2 + 1 matrix). You would go column by column, row by row, so like..
There are actually some really good encryption algorithms for wc3 that you could use in this (granted you rewrite them in Galaxy or w/e). There are also some new compression techniques =).
http://www.hiveworkshop.com/forums/jass-functions-413/snippet-scrambler-189766/ http://www.hiveworkshop.com/forums/spells-569/encoder-3-0-1-2-a-189883
Also, it might be smart to run this on something like a BigInt. Rather than doing math with strings, you can do it with arrays digit by digit ; ). That'll truly pack as much data as possible into the code ; P.
Furthermore, look at Encoder's tree structure. StarCode could be drastically improved by moving to a tree structure =).
And Scrambler would work on numbers like 60 with passwords that were the same towards the start ;P. It also scrambles better since it scrambles in a set of different bases.
There are still many improvements that can be made to your resource ;p.
I'm just saying that since there is no overhead in the code size, you could just add an Encrypt function or w/e over a Convert function or something.
I guess the overall architecture would need to change a bit to promote modularity ; ).
I know with something I was working on, I just had number stacks that could have their bases converted, meaning you could really do w/e.
thus making it extremely difficult to decrypt without increasing the code size, even with the base key ;).
Could you generate a set of keys based on a cipher and encrypt the thing with those keys?
Here is my precise thought-
you have your base (like base 87)
You have a cipher (like the person's account name)
For each character of the code, you do an algorithm using the current base and the cipher
For example, first base would be a base derived from the default base and the cipher and applied to character 1 of the code. The next base would be derived from the previous base and the cipher and applied to character 2, etc.
After this point, you do shuffling by putting the code into a uniform matrix + a linear matrix (anything extra after uniform is just put into the line). You go in steps of 2x2 matrices and rotate each one clockwise/counter clockwise (including the linear matrix, which would make each matrix like a 2x2 + 1 matrix). You would go column by column, row by row, so like..
column+=add;
if (column == matrixSize-1 || column == 0) { add*=-1; column+= add; row+=add2; if (row == matrixSize-1 || row == 0) { add2*=-1; row+=add; } }