Encrypt plaintext and update the GCM authentication state.

Synopsis

Declared in <openssl/modes.h>

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

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

ctx

GCM context ready for encryption (IV and optional AAD set).

in

Plaintext bytes of length len.

out

Ciphertext buffer of length len (may equal in).

len

Number of bytes to encrypt.

Created with MrDocs