CRYPTO_gcm128_decrypt

Decrypt ciphertext and update the GCM authentication state.

Synopsis

Declared in <openssl/modes.h>

int
CRYPTO_gcm128_decrypt(
    GCM128_CONTEXT* ctx,
    unsigned char const* in,
    unsigned char* out,
    size_t len);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxGCM context ready for decryption (IV and optional AAD set).
inCiphertext bytes of length len.
outPlaintext buffer of length len (may equal in).
lenNumber of bytes to decrypt.