Rivet.Ident.User.PasswordGenerator.Decimal (rivet_ident v3.5.0)

View Source

Summary

Functions

Decode puid into representative bits.

Encode bits into a puid.

Generate a puid

Puid.Info module info

Approximate risk in genertating total puids

Approximate total possible puids at a specified risk

Functions

decode(puid)

@spec decode(puid :: String.t()) :: bitstring() | Puid.Error.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() | Puid.Error.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{
  char_set: term(),
  characters: term(),
  entropy_bits: term(),
  entropy_bits_per_char: term(),
  ere: term(),
  length: term(),
  rand_bytes: term()
}

Puid.Info module info

risk(total)

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

Approximate risk in genertating total puids

total(risk)

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

Approximate total possible puids at a specified risk