# `SSL.Protocol.TLS12Record`
[🔗](https://github.com/gsmlg-dev/http_fetch/blob/v0.16.7/apps/ex_ssl/lib/ssl/protocol/tls12_record.ex#L1)

Pure TLS 1.2 AES-GCM record protection for one directional traffic epoch.

# `cipher`

```elixir
@type cipher() :: :aes_128_gcm | :aes_256_gcm
```

# `content_type`

```elixir
@type content_type() :: :alert | :handshake | :application_data
```

# `t`

```elixir
@type t() :: %SSL.Protocol.TLS12Record{
  cipher: cipher(),
  iv: &lt;&lt;_::32&gt;&gt;,
  key: binary(),
  sequence: non_neg_integer()
}
```

# `decrypt`

```elixir
@spec decrypt(t(), binary()) ::
  {:ok, content_type(), binary(), t()} | {:error, term()}
```

# `encrypt`

```elixir
@spec encrypt(t(), content_type(), binary()) ::
  {:ok, binary(), t()} | {:error, term()}
```

# `new`

```elixir
@spec new(term(), term(), term()) :: {:ok, t()} | {:error, term()}
```

---

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