Skip to content

Instantly share code, notes, and snippets.

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);