Proquint v1.0.2 Proquint
Proquint
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:
- Add
proquint
to your list of dependencies inmix.exs
:
def deps do
[{:proquint, "~> 0.1.0"}]
end
- Ensure
proquint
is started before your application:
def application do
[applications: [:proquint]]
end
Link to this section Summary
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