Random generator
The random data is generated in browser with crypto.getRandomValues which uses a pseudo-random number generator algorithm (PRNG), but should be suitable for cryptographic purposes. This data can be displayed as a byte list, in hex, in base64 or as a UUIDv4.
UUID v4 uses 6 bits to indicate version, leaving 122 random bits. The version indicators are masked over the random bits (M=0100 / 4, N=10xx / 8-B), xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx. If you want the full 128 bits use the hex form.