View Source Grizzly.ZWave.Security.S0NonceTable (grizzly v8.5.3)
This module is used to generate and store S0 nonces in response to incoming Security Nonce Get commands.
Summary
Functions
Returns a specification to start this module under a supervisor.
Takes a nonce from the nonce table. If the nonce is not found, nil
is returned.
The nonce will be removed from the nonce table.
Types
@type nonce() :: <<_::128>>
@type nonce_id() :: byte()
@type option() :: {:ttl, non_neg_integer()} | {:name, GenServer.name()} | {:random_fun, random_fun()}
@type random_fun() :: (bytes :: pos_integer() -> <<_::_*8>>)
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec generate(GenServer.server(), node_id :: pos_integer()) :: {:ok, nonce()} | :error
@spec start_link([option()]) :: GenServer.on_start()
@spec take(GenServer.server(), node_id :: pos_integer(), nonce_id :: nonce_id()) :: nonce() | nil
Takes a nonce from the nonce table. If the nonce is not found, nil
is returned.
The nonce will be removed from the nonce table.