Use sscanf with convertion parameter %X or strtol to convert the hex strings to numbers.
Use pow to raise the base with the exponent.
Use % to mod the number.
Use sprintf with convertion parameter %X to convert the number back to a hex string.
Your C code will be very small compared to the VB you posted.
Last edited by JohnW@Wessex; January 31st, 2008 at 06:59 AM.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.