Skip to content

rick1810/UID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

UID

Generate unique identifiers.

I just did not like the UUID standard,
so I made my own Unique Identifier.

By adding the version at the beggining instead of between the time,
The UID does not require to be the same length for all it's versions.


Maven

Note

Replace version with the latest version

<dependency>
  <groupId>com.dutch_computer_technology</groupId>
  <artifactId>uid</artifactId>
  <version>x.x.x</version>
</dependency>

Jar download

You can download any stable or newest version in /releases


Versions

v1

Generates a UID based on Time & Random,
Stringified as a 40 length hex separated by -

Component Value
version 1
time Unix time [High, Mid, Low]
key SecureRandom 12bytes

01-0196D421177D-9D7E5978E35A9B26D6CDED51

version time key
01 0196D421177D 9D7E5978E35A9B26D6CDED51
1 1747315660669 9D7E5978E35A9B26D6CDED51