memcpy(dst, src, sizeof(uuid_t));
}
+static void
+uuid_random_setflags(uuid_t out)
+{
+ out[6] = (out[6] & 0x0F) | 0x40;
+ out[8] = (out[8] & 0x3F) | 0x80;
+}
+
void
uuid_generate_random(uuid_t out)
{
read_random(out, sizeof(uuid_t));
+ uuid_random_setflags(out);
+}
- out[6] = (out[6] & 0x0F) | 0x40;
- out[8] = (out[8] & 0x3F) | 0x80;
+void
+uuid_generate_early_random(uuid_t out)
+{
+ read_frandom(out, sizeof(uuid_t));
+ uuid_random_setflags(out);
}
void