This file contains hidden or 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
import java.math.BigInteger; | |
import java.util.Collections; | |
import java.util.UUID; | |
import java.util.stream.Stream; | |
public class ShorterUuid { | |
private static void doit() { | |
String original = UUID.randomUUID().toString(); | |
String hex = original.replaceAll("-", ""); | |
String s = new BigInteger(hex, 16).toString(36); |
OlderNewer