Sample code for 30+ languages & platforms
C

Generate UUID

See more Encryption Examples

Demonstrates how to generate a random UUID string (also known as GUID) having the standard UUID format such as "de305d54-75b4-431b-adb2-eb6b9e546014".

Chilkat C Downloads

C
#include <C_CkCrypt2.h>

void ChilkatSample(void)
    {
    HCkCrypt2 crypt;
    const char *uuid;

    crypt = CkCrypt2_Create();

    uuid = CkCrypt2_generateUuid(crypt);

    printf("%s\n",uuid);


    CkCrypt2_Dispose(crypt);

    }