View Source ExOtp.Totp (ExOtp v0.0.1)

Module for the Time-based One-time Password algorithm.

Link to this section Summary

Link to this section Types

@type t() :: %ExOtp.Totp{base: ExOtp.Base.t(), interval: Integer.t()}

Link to this section Functions

Link to this function

at(totp, for_time, counter \\ 0)

View Source
@spec at(t(), DateTime.t(), integer()) :: String.t()
@spec new(integer(), String.t()) :: t()

Callback implementation for ExOtp.Behaviour.new/2.

Link to this function

provision_uri(totp, label, opts \\ [])

View Source
@spec provision_uri(t(), String.t(), keyword()) :: String.t()

Callback implementation for ExOtp.Behaviour.provision_uri/3.

Link to this function

valid?(totp, otp, for_time \\ DateTime.utc_now(), valid_window \\ 0)

View Source
@spec valid?(t(), String.t(), nil | Datetime.t(), nil | integer()) :: boolean()
@spec validate(t()) :: no_return() | t()

Callback implementation for ExOtp.Behaviour.validate/1.