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

Bounded TLS 1.3 inner plaintext encoding and decoding.

The final nonzero byte carries the real record content type. Any bytes after
it must be zero padding.

# `content_type`

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

# `decode`

```elixir
@spec decode(term()) ::
  {:error,
   :empty_inner_plaintext
   | :missing_inner_content_type
   | {:empty_content, :alert | :application_data | :handshake}
   | {:invalid_inner_plaintext, :not_binary}
   | {:unsupported_inner_content_type, 1..255}
   | {:content_length_exceeded, non_neg_integer(), 16384}
   | {:inner_plaintext_length_exceeded, non_neg_integer(), 16385}}
  | {:ok, :alert | :application_data | :handshake, binary(), non_neg_integer()}
```

# `encode`

```elixir
@spec encode(term(), term(), term()) :: {:ok, binary()} | {:error, term()}
```

---

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