GH# 878: check for valid hex characters, support SHA-1 name-based UUIDs (v5)

This commit is contained in:
Guenter Obiltschnig
2015-07-31 10:05:58 +02:00
parent 4ff19c95c0
commit d2c64b4493
6 changed files with 116 additions and 20 deletions

View File

@@ -61,6 +61,13 @@ public:
UUID createFromName(const UUID& nsid, const std::string& name, DigestEngine& de);
/// Creates a name-based UUID, using the given digest engine.
///
/// Note: in order to create a standard-compliant UUID, the given DigestEngine
/// must be either an instance of MD5Engine or SHA1Engine. The version field of
/// the UUID will be set accordingly.
UUID createFromName(const UUID& nsid, const std::string& name, DigestEngine& de, UUID::Version version);
/// Creates a name-based UUID, using the given digest engine and version.
UUID createRandom();
/// Creates a random UUID.