Created
August 12, 2015 13:14
-
-
Save frankvilhelmsen/c1c4deef778f9c2882a8 to your computer and use it in GitHub Desktop.
uuid-short-prefixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UUID uuid = UUID.randomUUID() | |
String partone = ""+ Long.toString(uuid.getMostSignificantBits(), 36) | |
String parttow = ""+ Long.toString(uuid.getLeastSignificantBits(), 36) | |
String k = "PREFIX$partone$parttow".replace("-", "") | |
String l = k.length() | |
println "UUID short version ($l) : $k" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UUID short version (31) : PREFIXkrfa04jbis5b16aj3psyqcnln