Skip to content

Add support for UUID generation

Suhas K S requested to merge uuid-generation into master

Design:

There are three methods to generate the UUID:

1. Using libuuid: This method is followed when libuuid is available and is the preferred method to generate the UUID.

2. Using uuid_create() from uuid.h: This method is followed when libuuid is not available.

3. Using the fallback mechanism: The file uri.c contains a fallback mechanism for generating the UUID using random numbers generated using the gnulib random module. This mechanism is a slightly modified version of the one used in Wget for the same purpose. This method is not preferred if either of the above two methods are possible.

Testing:

There is one automated test written to test the UUIDs generated by the above mechanisms. It essentially checks:

  1. If the characters in the generated UUID string belong to the character set of UUID strings (0-9, a-f and -).
  2. If the string follows the pattern: 8-4-4-4-12.

Closes #6 (closed)

Edited by Suhas K S

Merge request reports