Reconstructs and verifies openings from a borrowed proof buffer.
More...
|
| class | sealed |
| | A copyable digest commitment with no resident payload. More...
|
|
| | verifier (std::span< const std::uint8_t > proof) |
| | Starts replay at the beginning of a borrowed proof.
|
|
| verifier (bytes &&)=delete |
| | Rejects a temporary owning buffer that would leave dangling pointers.
|
| template<class T> |
| sealed< T > | seal (T value) const |
| | Computes a digest-only sealed value without reading the proof.
|
| template<class T> |
| T | unseal (sealed< T > p) |
| | Decodes the next value and checks the digest of exactly its consumed bytes.
|
| void | finish () const |
| | Checks that replay consumed every proof byte.
|
Reconstructs and verifies openings from a borrowed proof buffer.
- Note
- The proof storage must outlive the verifier and remain unchanged.
Definition at line 89 of file auth.ccm.
◆ verifier()
| auth::verifier::verifier |
( |
std::span< const std::uint8_t > | proof | ) |
|
|
inlineexplicit |
Starts replay at the beginning of a borrowed proof.
- Parameters
-
| proof | Immutable serialized openings whose storage outlives this verifier. |
Definition at line 118 of file auth.ccm.
◆ finish()
| void auth::verifier::finish |
( |
| ) |
const |
|
inline |
Checks that replay consumed every proof byte.
- Exceptions
-
Definition at line 164 of file auth.ccm.
◆ seal()
template<class T>
| sealed< T > auth::verifier::seal |
( |
T | value | ) |
const |
|
inline |
Computes a digest-only sealed value without reading the proof.
- Parameters
-
| value | Payload to serialize and hash; it is not retained. |
- Returns
- A commitment with the same digest as prover::seal for the same encoding.
- Note
- Serialization, allocation, and payload construction exceptions propagate.
Definition at line 129 of file auth.ccm.
◆ unseal()
template<class T>
| T auth::verifier::unseal |
( |
sealed< T > | p | ) |
|
|
inline |
Decodes the next value and checks the digest of exactly its consumed bytes.
- Parameters
-
| p | Commitment to the next serialized value. |
- Returns
- The reconstructed payload.
- Exceptions
-
| auth_error | If input is truncated, malformed, or does not match the digest. |
- Note
- The cursor advances only after successful return construction. Any failure leaves it unchanged. A zero-byte value does not advance the cursor.
Definition at line 141 of file auth.ccm.
The documentation for this struct was generated from the following file: