Skip to main content

mbedtls_lms_export_public_key

Function mbedtls_lms_export_public_key 

Source
pub unsafe extern "C" fn mbedtls_lms_export_public_key(
    ctx: *const mbedtls_lms_public_t,
    key: *mut c_uchar,
    key_size: usize,
    key_len: *mut usize,
) -> c_int
Expand description

\brief This function exports an LMS public key from a LMS public context that already contains a public key.

\note Before this function is called, the context must have been initialized and the context must contain a public key.

\note See IETF RFC8554 for details of the encoding of this public key.

\param ctx The initialized LMS public context that contains the public key. \param key The buffer into which the key will be output. Must be at least #MBEDTLS_LMS_PUBLIC_KEY_LEN in size. \param key_size The size of the key buffer. \param key_len If not NULL, will be written with the size of the key.

\return \c 0 on success. \return A non-zero error code on failure.