[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libWARC | Add support for UUID generation (!6)
From: |
Suhas K S |
Subject: |
libWARC | Add support for UUID generation (!6) |
Date: |
Fri, 29 May 2020 08:01:47 +0000 |
Suhas K S created a merge request:
https://gitlab.com/gnuwget/libwarc/-/merge_requests/6
Branches: uuid-generation to basic-setup
Author: Suhas K S
## 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
`generate_random_number()`. This mechanism is a slightly modified version of
the one used in Wget for the same purpose. The random number generation
function is also a modified version of the `random_number()` function in
`src/utils.c` from Wget. 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
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/libwarc/-/merge_requests/6
You're receiving this email because of your account on gitlab.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- libWARC | Add support for UUID generation (!6),
Suhas K S <=