Safeheron-SGX-Native-Development-Framework v1.2.0
Loading...
Searching...
No Matches
ssgx::utils_t::UUIDGenerator Class Reference

A thread-safe UUID Generator that generates only UUID V4 (random-based). More...

#include <ssgx_utils_t_uuid.h>

Public Member Functions

 UUIDGenerator ()=default
 Default constructor for the UUIDGenerator class.
 
std::string NewUUID4 ()
 Generates a new UUID V4 (random-based).
 

Detailed Description

A thread-safe UUID Generator that generates only UUID V4 (random-based).

This class provides a method to generate Universally Unique Identifiers (UUIDs) conforming to version 4 of the UUID standard. It is thread-safe and ensures unique IDs in concurrent environments.

Constructor & Destructor Documentation

◆ UUIDGenerator()

ssgx::utils_t::UUIDGenerator::UUIDGenerator ( )
default

Default constructor for the UUIDGenerator class.

Initializes the generator. No explicit setup is needed since the initialization flag ensures proper state during the first use.

Member Function Documentation

◆ NewUUID4()

std::string ssgx::utils_t::UUIDGenerator::NewUUID4 ( )

Generates a new UUID V4 (random-based).

This method is thread-safe and ensures that a unique UUID is generated even when accessed concurrently by multiple threads.

Returns
A string representation of the UUID V4 in the standard format, e.g., "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx", where 'x' is a hexadecimal digit and 'y' is one of [8, 9, A, B].
Exceptions
std::runtime_errorFailed in UUID initialization!

The documentation for this class was generated from the following file: