Skip to content

hashing

A collection of hashing and random text generation utilities.

random_hex(length=12)

Generate a cryptographically random hex string ID of a certain length.

Parameters:

Name Type Description Default
length int

The length of the hex string to generate.

12

Returns:

Type Description
str

A random hex string ID.

Examples:

>>> random_hex(16)
'...'