I need to generate a GUID or UUID based on high and low values.
I already converted the high and low values to uint32 or I hope so. I converted the numbers with this code:
var n1 = lo_value; var n2 = hi_value; var n1Low16 = n1 & 0x0000ffff; var n1High16 = n1 >>> 16; var n2Low16 = n2 & 0x0000ffff; var n2High16 = n2 >>> 16; var resultLow32 = (((n1 & 0xffff0000) * n2) >>> 0) + (((n1 & 0x0000ffff) * n2) >>> 0) >>> 0; var resultHigh32 = n1High16 * n2High16 + ((((n1Low16 * n2Low16) >>> 17) + n1Low16 * n2High16) >>> 15);
I want to create a function that returns the generated UUID or GUID as a string but I can' find anything online.
User contributions licensed under CC BY-SA 3.0