Sign in to follow this  
Ridgepig

CoD4 GUID calculation

Recommended Posts

Hi,

 

Does anyone know how CoD4 calculates a player's GUID?

I'm aware that in Quake 3 the GUID simply gets calculated from the keycode.

However, if I do so in CoD4 it doesn't result in my GUID.

 

I hope someone can provide me with the answer.

Share this post


Link to post
Share on other sites

    md5.buf[0] = 0x6F1CD602;
    md5.buf[1] = 0x226C74BE;
    md5.buf[2] = 0xB31C088D;
    md5.buf[3] = 0x555A9639;
    md5.bits[0] = 0;
    md5.bits[1] = 0;

    MD5Update(&md5 , buffer, 16);
    MD5Final(&md5, digest);

    sprintf(final, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
            digest[0], digest[1], digest[2], digest[3], digest[4], digest[5], digest[6], digest[7],
            digest[8], digest[9], digest[10], digest[11], digest[12], digest[13], digest[14], digest[15]
    );

Share this post


Link to post
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
Sign in to follow this