Function bearssl::br_gcm_run [] [src]

pub unsafe extern "C" fn br_gcm_run(
    ctx: *mut br_gcm_context,
    encrypt: c_int,
    data: *mut c_void,
    len: usize
)

\brief Encrypt or decrypt some data with GCM.

Data encryption or decryption can be done after br_gcm_flip() has been called on the context. If encrypt is non-zero, then the provided data shall be plaintext, and it is encrypted in place. Otherwise, the data shall be ciphertext, and it is decrypted in place.

Data may be provided in several chunks of arbitrary length. The maximum total length for data is 239-256 bits, i.e. about 65 gigabytes.

\param ctx GCM context structure. \param encrypt non-zero for encryption, zero for decryption. \param data data to encrypt or decrypt. \param len data length (in bytes).