/uuid4

Primary LanguageCMIT LicenseMIT

uuid4

A tiny C library for generating uuid4 strings.

Depends on OpenSSL random generator.

Usage

uuid4.c and uuid4.h should be coppied into an existing project. The library contains two functions: one to initialize the library and one to generate a uuid4 string and store it in a buffer of at least UUID4_LEN in size.

char buf[UUID4_LEN];
uuid4_init();
uuid4_generate(buf);
printf("%s\n", buf);

uuid4_generate() is not thread-safe.

Based on https://github.com/rxi/uuid4