Skip to main content

gen_random_uuid_bytes

Function gen_random_uuid_bytes 

Source
pub fn gen_random_uuid_bytes() -> [u8; 16]
Expand description

v7.17.0 — generate a RFC 4122 v4 (random) UUID. Layout: 16 random bytes with the version nibble (high nibble of byte 6) pinned to 0100 (= 4) and the variant top bits (high two bits of byte 8) pinned to 10 — exactly what PG’s gen_random_uuid() and the historical uuid-ossp uuid_generate_v4() produce.