the unlocking code is most likely random. there have been marks on the soldering pads on both the phones I've tested the unlocker with, suggesting that after production, the board has been put onto a "bed of nails" and locked via RS232 (TTL). There are basic commands AT%IMEI, AT%SLUC (sim lock unlock code) and AT%SLEN (sim lock enable) which can be exploited for this very easily. The unlock codes can be chosen arbitrarily, and implementing a database which links randomly generated unlock codes to the IMEI is trivial. but then again, the service provider might get the stupid idea to use a deterministic algorithm which generates the unlock code from the IMEI - to find out whether this is true, you'd require a rather large number of IMEI-unlock code combinations and some patience.
soldering three wires for txd, rxd, gnd onto the cell phone's board or even using a plain data cable (KE500) shouldn't keep anyone technically savvy from unlocking the phone.
that being said, it's astonishing how resiliant the phone vendors are to use secure means of protection. there are mass production systems which haven't been hacked even though many have tried (e.g. PS3). those shiny overpriced boxes can't do s.. against consequent code signing and strict use of asymmetric cryptography (RSA/ECC) for security functionalities.