Skip to content

A tiny C library for generating uuid4 strings on an ESP32

License

Notifications You must be signed in to change notification settings

stephendpmurphy/uuid4_esp32

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

uuid4

A tiny C library for generating uuid4 strings. This module has been adapted from the original author to instead use the hardware based random number generator in an ESP32 to generate the seed for the uuid4. The ESP32 RNG entropy source is enabled using the bootloader_random_enable() function. The ESP32 RNG API reference can be found here.

Usage

uuid4.c and uuid4.h should be dropped 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.

License

This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.

About

A tiny C library for generating uuid4 strings on an ESP32

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • C 100.0%