mbedtls_gcm_setkey() function
This function associates a GCM context with a cipher algorithm and a key.
Arguments
ctx
The GCM context. This must be initialized.
cipher
The 128-bit block cipher to use.
key
The encryption key. This must be a readable buffer of at least \p keybits bits.
keybits
The key size in bits. Valid options are: 128 bits 192 bits 256 bits
Return value
\c 0 on success. A cipher-specific error code on failure.