Resuelve AuthPlug v1.4.3 ResuelveAuth.Utils.Secret View Source
Contains encoding, decoding, encryption, and decryption logic.
Link to this section Summary
Functions
Identify if the tuple of the signed string is valid according to the sent token.
Sign the information with a seed (secret
)
by first going through a coding process.
Link to this section Functions
Specs
Specs
decode64(%{}) :: tuple()
Specs
encode(%{}) :: tuple()
Specs
Specs
equivalent?({:error, String.t()}, String.t() | nil) :: {:error, String.t()}
equivalent?(%{}, String.t()) :: boolean()
Identify if the tuple of the signed string is valid according to the sent token.
Example
iex> alias ResuelveAuth.Utils.Secret
iex> data = %{valid: "datos"}
iex> Secret.equivalent?(data, "datos")
true
iex> alias ResuelveAuth.Utils.Secret
iex> data = {:error, "error message"}
iex> Secret.equivalent?(data, "data")
{:error, "error message"}
Specs
Sign the information with a seed (secret
)
by first going through a coding process.