# `VintageNetWiFi.WPSData`
[🔗](https://github.com/nerves-networking/vintage_net_wifi/blob/v0.12.5/lib/vintage_net_wifi/wps_data.ex#L1)

Utilities for handling WPS data

# `t`

```elixir
@type t() :: %{
  optional(:credential) =&gt; t(),
  optional(:mac_address) =&gt; binary(),
  optional(:network_key) =&gt; binary(),
  optional(:network_index) =&gt; non_neg_integer(),
  optional(0..65536) =&gt; binary()
}
```

A map containing WPS data

All keys are optional. Known keys use atoms. Unknown keys use their numeric
value and their value is left as a raw binary.

Known keys:

* `:credential` - a map of WiFi credentials (also WPS data)
* `:mac_address` - a MAC address in string form (i.e., `"aa:bb:cc:dd:ee:ff"`)
* `:network_key` - a passphrase or PSK
* `:network_index` - the key index

# `decode`

```elixir
@spec decode(binary()) :: {:ok, t()} | :error
```

Decode WPS data

The WPS data is expected to be in hex string form like what the
wpa_supplicant reports.

---

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