Finalise GCM and optionally verify a received authentication tag.
Declared in <openssl/modes.h>
int
CRYPTO_gcm128_finish(
GCM128_CONTEXT* ctx,
unsigned char const* tag,
size_t len);
1 on success (and tag match when verifying), or 0 on failure.
| Name | Description |
|---|---|
| ctx | GCM context after encrypt/decrypt (and AAD) processing. |
| tag | Expected tag to verify, or NULL to skip verification (encrypt path). |
| len | Length of tag in bytes when tag is non-NULL. |