Generating a Version 4 UUID using OpenSSL A simple function that uses OpenSSL's RAND_bytes function to generate a Version 4 UUID.