Helper for generating random hexadecimal IDs and deterministic hash IDs.
More...
#include <Utils/CRandomID.h>
|
| static const std::string & | generate (int len=16) |
| | Generate a random lowercase hexadecimal string.
|
| static const std::string & | hashID (const char *key) |
| | Compute a numeric hash string for a key.
|
Helper for generating random hexadecimal IDs and deterministic hash IDs.
Returned string references point to a shared temporary buffer and should be copied if the value must survive the next utility call that reuses that buffer.
◆ generate()
| const std::string & Skylicht::CRandomID::generate |
( |
int | len = 16 | ) |
|
|
static |
Generate a random lowercase hexadecimal string.
- Parameters
-
| len | Number of characters to generate. |
- Returns
- Generated ID string stored in the shared temporary buffer.
◆ hashID()
| const std::string & Skylicht::CRandomID::hashID |
( |
const char * | key | ) |
|
|
static |
Compute a numeric hash string for a key.
- Parameters
-
| key | Null-terminated input key. |
- Returns
- Hash value converted to decimal text in the shared temporary buffer.
The documentation for this class was generated from the following file: