UUID generator and parser.
More...
#include <uuid.hpp>
UUID generator and parser.
See RFC 4122 for more details (http://www.ietf.org/rfc/rfc4122.txt)
This class needs anch-crypto and anch-device libraries.
- Since
- 0.1
- Author
- Vincent Lachenal
The UUID versions
- Since
- 0.1
- Author
- Vincent Lachenal
Enumerator |
---|
MAC_ADDRESS |
MAC address based algorithm
|
DCE_SECURITY |
DCE security (Windows) base algorithm
|
MD5_HASH |
MD5 hash based algorithm
|
RANDOM |
Random based algorithm
|
SHA1_HASH |
SHA1 hash based algorithm
|
anch::Uuid::Uuid |
( |
const Uuid & |
uuid | ) |
|
|
inline |
Uuid copy constructor
- Parameters
-
virtual anch::Uuid::~Uuid |
( |
| ) |
|
|
inlinevirtual |
static void anch::Uuid::generateUuid |
( |
Uuid & |
uuid, |
|
|
anch::Uuid::Version |
version = anch::Uuid::Version::RANDOM , |
|
|
const std::string & |
data = "" |
|
) |
| |
|
inlinestatic |
Generate a new UUID
- Parameters
-
uuid | The UUID to set |
version | The UUID algorithm version to use (default to MAC based algorithm) |
data | The data to process (used to SHA1 and MD5 algorithms) |
static void anch::Uuid::generateUuidVersion1 |
( |
Uuid & |
uuid, |
|
|
const std::string & |
macAddress = "" |
|
) |
| |
|
inlinestatic |
Generate a new UUID with version 1 (MAC address based) algorithm
- Parameters
-
uuid | The UUID to set |
macAddress | The MAC address to use. If empty, the first MAC address available will be choosen |
static void anch::Uuid::generateUuidVersion3 |
( |
Uuid & |
uuid, |
|
|
const std::string & |
data |
|
) |
| |
|
inlinestatic |
Generate a new UUID with version 3 (MD5 based) algorithm
- Parameters
-
uuid | The UUID to set |
data | The data to process |
static void anch::Uuid::generateUuidVersion4 |
( |
Uuid & |
uuid | ) |
|
|
inlinestatic |
Generate a new UUID with version 4 (random) algorithm
- Parameters
-
static void anch::Uuid::generateUuidVersion5 |
( |
Uuid & |
uuid, |
|
|
const std::string & |
data |
|
) |
| |
|
inlinestatic |
Generate a new UUID with version 5 (SHA1 based) algorithm
- Parameters
-
uuid | The UUID to set |
data | The data to process |
uint16_t anch::Uuid::getClockSeqHighRes |
( |
| ) |
const |
|
inline |
The clock sequence high value and reserved value getter
- Returns
- The clock sequence high value and reserved value
uint16_t anch::Uuid::getClockSeqLow |
( |
| ) |
const |
|
inline |
The clock sequence low value getter
- Returns
- The clock sequence low value
uint16_t anch::Uuid::getHighTime |
( |
| ) |
const |
|
inline |
The timestamp high value getter
- Returns
- The timestamp high value
uint32_t anch::Uuid::getLowTime |
( |
| ) |
const |
|
inline |
The timestamp low value getter
- Returns
- The timestamp low value
uint16_t anch::Uuid::getMidTime |
( |
| ) |
const |
|
inline |
The timestamp mid value getter
- Returns
- The timestamp mid value
uint64_t anch::Uuid::getNode |
( |
| ) |
const |
|
inline |
The node getter
- Returns
- The node
Version getter
- Returns
- The version
std::string anch::Uuid::toString |
( |
| ) |
const |
|
inline |
Convert Uuid to std::string
- Returns
- The string representation of Uuid
The documentation for this class was generated from the following file: