Proquint v1.0.2 Proquint

Proquint

Travis Hex.pm Hex.pm

An elixir package that converts ids to proquints, Identifiers that are Readable, Spellable, and Pronounceable. More info about proquints can be found at: https://arxiv.org/html/0901.4016

Usage

# encode
bin = << 63 :: size(8), 84 :: size(8), 220 :: size(8), 193 :: size(8) >>
assert Proquint.encode(bin) == "gutih-tugad"

# decode
bin = << 63 :: size(8), 84 :: size(8), 220 :: size(8), 193 :: size(8) >>
assert Proquint.decode("gutih-tugad") == bin

Installation

If available in Hex, the package can be installed as:

  1. Add proquint to your list of dependencies in mix.exs:
def deps do
  [{:proquint, "~> 0.1.0"}]
end
  1. Ensure proquint is started before your application:
def application do
  [applications: [:proquint]]
end

Link to this section Summary

Functions

Decode a proqunit to a binary

Encode a binary to a proquint

Link to this section Functions

Link to this function

decode(string, separator \\ "-")

Decode a proqunit to a binary

Link to this function

encode(bytes, separator \\ "-")

Encode a binary to a proquint