Puid 2.3
Puid 2.3 adds four functions to Puid generated modules:
- total: total puids which can be generated at a specified
risk - risk: risk in generating a specified
totalpuids - encode: encode a
bitstringto a puid - decode: decode a
puidinto the representative bitstring
total and risk are useful for after-the-fact considerations. You created a puid generator, and now want to know:
- with this generator, what is the risk of repeat if I generate
totalpuids - with this generator, what is the total number of puids I can generate at some
risk
encode and decode were added to facilitate the creation of an ecto-puid package that allows Puid generation for DB ids. These function are not robust. They expect to be used with Puid generated values, and as such those values must be valid with respect to the Puid generator in use.