ShortUUID (ShortUUID v1.0.0) View Source

ShortUUID allows UUIDs to be encoded in a more URL- and user-friendly Base58 format:

iex> ShortUUID.encode("64d7280f-736a-4ffa-b9c0-383f43486d0b")
"DTEETeS5R2XxjrVTZxXoJS"

iex> ShortUUID.decode("DTEETeS5R2XxjrVTZxXoJS")
"64d7280f-736a-4ffa-b9c0-383f43486d0b"

Link to this section Summary

Functions

Decodes the given ShortUUID back into a UUID.

Encodes the given UUID into a ShortUUID.

Link to this section Functions

Specs

decode(String.t()) :: String.t()

Decodes the given ShortUUID back into a UUID.

Examples

iex> ShortUUID.decode("DTEETeS5R2XxjrVTZxXoJS")
"64d7280f-736a-4ffa-b9c0-383f43486d0b"

Specs

encode(String.t()) :: String.t()

Encodes the given UUID into a ShortUUID.

Examples

iex> ShortUUID.encode("64d7280f-736a-4ffa-b9c0-383f43486d0b")
"DTEETeS5R2XxjrVTZxXoJS"