Resuelve AuthPlug v1.3.0 ResuelveAuth.Utils.Secret View Source
Contiene lógica de codificación, decodificación, cifrado y descifrado.
Link to this section Summary
Functions
Identifica si la tupla de la cadena firmada es válida de acuerdo al token enviado.
Firma la información con una semilla (secret
) pasando primero por un
proceso de códificación.
Link to this section Functions
Link to this function
cypher(params) View Source
Link to this function
cypher(data, secret) View Source
Link to this function
cypher(data, sign, secret) View Source
Link to this function
decode(result) View Source
Link to this function
decode64(input)
View Source
decode64(input)
View Source
decode64(%{}) :: tuple()
decode64(%{}) :: tuple()
Link to this function
encode(input)
View Source
encode(input)
View Source
encode(%{}) :: tuple()
encode(%{}) :: tuple()
Link to this function
encode64(error) View Source
Link to this function
equivalent?(params, sign) View Source
Identifica si la tupla de la cadena firmada es válida de acuerdo al token enviado.
Ejemplo:
iex> alias ResuelveAuth.Utils.Secret
iex> data = {:error, "mensaje de error"}
iex> Secret.equivalent?(data, "data")
{:error, "mensaje de error"}
iex> alias ResuelveAuth.Utils.Secret
iex> data = %{valid: "datos"}
iex> Secret.equivalent?(data, "datos")
true
Link to this function
sign(data, options) View Source
Firma la información con una semilla (secret
) pasando primero por un
proceso de códificación.