# `Pkcs11ex.PDF`
[🔗](https://github.com/utaladriz/pkcs11ex/blob/v0.1.0/lib/pkcs11ex/pdf.ex#L1)

Convenience wrapper around `SignCore.PDF` pre-configured with the
PKCS#11 signer.

    Pkcs11ex.PDF.sign(pdf,
      signer: {:legal_proxy, :signing},
      alg: :PS256,
      x5c: leaf_der
    )

is shorthand for

    SignCore.PDF.sign(pdf,
      signer: %Pkcs11ex.Signer{slot_ref: :legal_proxy, key_ref: :signing},
      alg: :PS256,
      x5c: leaf_der
    )

Verify is signer-independent — it just delegates to
`SignCore.PDF.verify/2`.

# `sign`

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

PAdES B-B / B-T sign via the configured PKCS#11 slot.

# `verify`

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

PAdES verify. Delegates to `SignCore.PDF.verify/2`.

---

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