riot_sys

Function sha256_chain_verify_element

Source
pub unsafe extern "C" fn sha256_chain_verify_element(
    element: *mut c_void,
    element_index: size_t,
    tail_element: *mut c_void,
    chain_length: size_t,
) -> c_int
Expand description

@brief function to verify if a given chain element is part of the chain.

@param[in] element the chain element to be verified @param[in] element_index the position in the chain @param[in] tail_element the last element of the sha256-chain @param[in] chain_length the number of elements in the chain

@returns 0 if element is verified to be part of the chain at element_index 1 if the element cannot be verified as part of the chain