Striving to become a master Go/Cloud developer; Father ๐จโ๐งโ๐ฆ; ๐ค/((Full Stack Web|Unity3D) + Developer)/g; Science supporter ๐ฉโ๐ฌ; https://coder.today
Beside your parameters (time and random number), you need another one, to avoid collision between 2 separate instances that reach the same random at the same time (I know that is far fetched ..), and the UUID uses something from the localhost (a mac address for instance).
You do not need a counter, as the 100s-nanoseconds interval and a good random number should be enough to avoid a collision. If you have a counter and only 1 machine generating it, you will not need anything else anyway. They will be unique in your system.
The paper is not so technical, I suggest reading it: tools.ietf.org/html/rfc4122
You will want a Random-based UUID, which is 4.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
UUID is pretty standard, and already has 5 version of algorithms. You do not need to invent a new one, just read the specs or use the npm package:
en.wikipedia.org/wiki/Universally_...
npmjs.com/package/uuid seems to respect the standard. Other tools like databases use it too (like MongoDB)
Beside your parameters (time and random number), you need another one, to avoid collision between 2 separate instances that reach the same random at the same time (I know that is far fetched ..), and the UUID uses something from the localhost (a mac address for instance).
You do not need a counter, as the 100s-nanoseconds interval and a good random number should be enough to avoid a collision. If you have a counter and only 1 machine generating it, you will not need anything else anyway. They will be unique in your system.
The paper is not so technical, I suggest reading it: tools.ietf.org/html/rfc4122
You will want a Random-based UUID, which is 4.