



@deftypefun {int} {gnutls_hpke_export_pubkey} (const gnutls_hpke_context_t @var{ctx}, const gnutls_pubkey_t @var{pubkey}, gnutls_datum_t * @var{pubkey_raw})
@var{ctx}: The HPKE context to use for exporting the public key.

@var{pubkey}: An initialized public key.

@var{pubkey_raw}: A pointer to a gnutls_datum_t structure where the exported raw public key data will be stored.

This function exports raw public key data from  @code{pubkey} , which
must be compatible with the HPKE context  @code{ctx} .

The function will allocate memory for  @code{pubkey_raw} , and the caller is
responsible for freeing this memory using @code{gnutls_free()}  when it is
no longer needed.

@strong{Returns:} 0 on success, or a negative error code on failure

@strong{Since:} 3.8.14
@end deftypefun
