Whats the point in keeping the source of the Unlock code closed if you are giving it for free ???
The unlock code is calculated in a very simple way, if you have learnt logic gates you will probably know about XOR gates. These return 1 only when there is different bits for eg 1 XOR 0 = 1 & 1 XOR 1 = 0.
so IMEI(
123456789012347) + hash (12345) =
12345678901234712345
use MD5 on this to get something like 16 bits hex code
"0x 1x 2x 3x 4x 5x 6x 7x 8x 9x ax bx cx dx ex fx"
Now
0x xor 4x xor 8x xor cx =xx
1x xor 5x xor 9x xor dx =yy
2x xor 6x xor ax xor ex =zz
3x xor 7x xor bx xor fx =ww
xxyyzzww and 2000000 = abcdefg
Convert this Hexdecimal output to decimal to get unlock code
Dec(abcdefg) =
unlockcode
This is the basic principle on which unlocking is dependent
for hash use 5e8dd316726b0335
and for flash use 797B7BC6BE525AB44