15namespace Azure {
namespace Core {
40 constexpr explicit Uuid() : m_uuid{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} {}
72 static Uuid Parse(std::string
const& uuidString);
85 for (
size_t i = 0; i < m_uuid.size(); ++i)
87 if (m_uuid[i] != other.m_uuid[i])
113 for (
size_t i = 0; i < m_uuid.size(); ++i)
Universally unique identifier.
Definition uuid.hpp:19
std::string ToString() const
Gets Uuid as a string.
Definition uuid.cpp:66
constexpr bool IsNil() const
Checks if the value represents a Nil UUID (00000000-0000-0000-0000-000000000000).
Definition uuid.hpp:109
static constexpr Uuid CreateFromArray(ValueArray const &uuid)
Construct a Uuid from an existing UUID represented as an array of bytes.
Definition uuid.hpp:65
static Uuid CreateUuid()
Creates a new random UUID.
Definition uuid.cpp:134
constexpr bool operator!=(Uuid const &other) const
Compares with another instance of Uuid for inequality.
Definition uuid.hpp:103
static Uuid Parse(std::string const &uuidString)
Construct a Uuid by parsing its representation.
Definition uuid.cpp:88
constexpr ValueArray const & AsArray() const
Returns the binary value of the Uuid for consumption by clients who need non-string representation of...
Definition uuid.hpp:53
std::array< std::uint8_t, 16 > ValueArray
Represents a byte array where the UUID value can be stored.
Definition uuid.hpp:25
constexpr Uuid()
Constructs a Nil UUID (00000000-0000-0000-0000-000000000000).
Definition uuid.hpp:40
constexpr bool operator==(Uuid const &other) const
Compares with another instance of Uuid for equality.
Definition uuid.hpp:80
Compute the hash value for the input binary data, using SHA256, SHA384 and SHA512.
Definition azure_assert.hpp:57