Skip to content

Instantly share code, notes, and snippets.

@wrouesnel
Created June 8, 2022 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wrouesnel/969a9e3f451179fc69a760c36da3b4e5 to your computer and use it in GitHub Desktop.
Save wrouesnel/969a9e3f451179fc69a760c36da3b4e5 to your computer and use it in GitHub Desktop.
128 bit ID in b32 lowercase with no special characters
# Generate a 128-bit identifier, encoded entirely in b32 lowercase. No special characters.
function safeid() {
python3 -c 'import uuid, base64 ; print(base64.b32encode(uuid.uuid4().bytes).lower().rstrip(b"=").decode())'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment