# `BoundedAuthorityProtocol.V1.Base64Url`
[🔗](https://github.com/baselabs/bounded_authority_protocol/blob/v1.0.0/lib/bounded_authority_protocol/v1/base64url.ex#L1)

Strict bounded canonical base64url decoding for v1.

`decode/2` accepts only the unpadded `A-Z`, `a-z`, `0-9`, `-`, and `_` alphabet, projects the
decoded size before allocation, and requires byte-identical unpadded re-encoding. Caller limits
may only tighten the positive-integer hard maxima. Success returns `{:ok, binary}`; every
failure returns the fixed value-free `{:error, :invalid}`.

# `decode`

```elixir
@spec decode(binary(), BoundedAuthorityProtocol.V1.Bounds.t() | map()) ::
  {:ok, binary()} | {:error, :invalid}
```

Decodes a bounded canonical base64url segment.

---

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