šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

huuid

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

huuid

library to convert uuids forth and back to a human-readable and pronounceable format

0.9.0
Source
PyPI
Maintainers
1

huuid - human UUIDs

python3-library to convert uuids forth and back to a human-readable and pronounceable format

What is huuid

hhuid does a bijective transformation from uuids to a format that can be read, pronounced and typed a lot better than the default formats. No Information is lost in the mapping.

Here is an example-output of the demo.py in the tests-folder:

generated uuid:          f3ad6cef-2732-4b18-97dd-137a459eb656
human-readable:          tapratnaz-vorjonfif-Tezjozdin-sejgipneh
Afer back-translation:   f3ad6cef-2732-4b18-97dd-137a459eb656
--- other usecases: ---
first 32bit human-readable:  tapratnaz
generated 32bit-Password:    Sunmuhnud
generated 64bit-Password:    Vezvegdum-ladzibkal

How to use huuid

Install it using pip:

pip install huuid

or just put the folder huuid in your project-root. (Jep, just that one file - that's all!)

Then in python import it in your code with

import huuid

and convert any uuid-object or uuid-string to a huuid-string with

huuid.uuid2human(myUuidObject)

Optionally you can limit the huuid-string to the 32, 64 or 96 bit:

huuid.uuid2human(myUuidObject, 64)

Convert it back to a uuid-string with

huuid.human2uuid(myUuidObject)

Background

The hexadecimal representation of the UUID is translated to letters that have an unambiguous pronounciation. The 2nd, and then every third letter is a vowel, the other ones are consonants which makes up a well pronounced word that sounds like it is made up of syllables.

There are 5 vowels and 16 consonants (just unambiguous ones) being used, and (only) for the first letter capitals are allowed. (And a capital-C additional to the 16 chosen unambiguous consonants to reach 32bit with 9 letters)

With this pattern there are a little more than 2^32 possibilities to generate a word with 9 letters. 4 "Words" hit the 128bit of UUIDs (>10^38).

Dependencies

This only uses the python3-modules uuid and math.

Credits

This is highly inspired by

https://arxiv.org/html/0901.4016

published by Daniel Shawcross Wilkerson and its implementation:

https://github.com/dsw/proquint

Keywords

TeX

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts