Rivet.Ident.User.PasswordGenerator.Alpha (rivet_ident v3.6.1)

View Source

Summary

Functions

Decode puid into representative bits.

Encode bits into a puid.

Generate a puid

Puid.Info module info

Approximate risk in generating total puids

Approximate total possible puids at a specified risk

Functions

decode(puid)

@spec decode(puid :: String.t()) :: bitstring() | {:error, String.t()}

Decode puid into representative bits.

puid must a representative puid from this module.

NOTE: decode/1 is not supported for non-ascii character sets

encode(bits)

@spec encode(bits :: bitstring()) :: String.t() | {:error, String.t()}

Encode bits into a puid.

bits must contain enough bits to create a puid. The rest are ignored.

generate()

@spec generate() :: String.t()

Generate a puid

info()

@spec info() :: Puid.Info.t()

Puid.Info module info

risk(total)

@spec risk(total :: float()) :: integer()

Approximate risk in generating total puids

total(risk)

@spec total(risk :: float()) :: integer()

Approximate total possible puids at a specified risk