# `Grizzly.ZWave.Security.S0NonceTable`
[🔗](https://github.com/smartrent/grizzly/blob/v9.1.4/lib/grizzly/zwave/security/s0_nonce_table.ex#L1)

This module is used to generate and store S0 nonces in response to incoming
Security Nonce Get commands.

# `nonce`

```elixir
@type nonce() :: &lt;&lt;_::128&gt;&gt;
```

# `nonce_id`

```elixir
@type nonce_id() :: byte()
```

# `option`

```elixir
@type option() ::
  {:ttl, non_neg_integer()}
  | {:name, GenServer.name()}
  | {:random_fun, random_fun()}
```

# `random_fun`

```elixir
@type random_fun() :: (bytes :: pos_integer() -&gt; &lt;&lt;_::_*8&gt;&gt;)
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `generate`

```elixir
@spec generate(GenServer.server(), node_id :: pos_integer()) ::
  {:ok, nonce()} | :error
```

# `start_link`

```elixir
@spec start_link([option()]) :: GenServer.on_start()
```

# `take`

```elixir
@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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
