IElixir.HMAC (IElixir v1.0.1) View Source
This module provides server which computes HMAC signature of provided message.
Link to this section Summary
Types
Return values of start*
functions
Functions
Returns a specification to start this module under a supervisor.
Compute signature for provided message.
Callback implementation for GenServer.init/1
.
Start HMAC server
Link to this section Types
Specs
Return values of start*
functions
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
compute_signature(header_str, parent_header_str, metadata_str, content_str)
View SourceSpecs
Compute signature for provided message.
Example
iex> IElixir.HMAC.compute_signature("", "", "", "")
"25eb8ea448d87f384f43c96960600c2ce1e713a364739674a6801585ae627958"
Callback implementation for GenServer.init/1
.
Specs
Start HMAC server:
IElixir.HMAC.start_link(%{"signature_scheme" => "hmac-sha256", "key" => "7534565f-e742-40f3-85b4-bf4e5f35390a"})
Options
"signature_scheme" and "key" options are required for proper work of HMAC server.