Skip to main content

pamoja_image_verifier_update

Function pamoja_image_verifier_update 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_image_verifier_update( verifier: *mut PamojaImageVerifier, chunk: *const u8, len: usize, ) -> PamojaStatus
Expand description

Takes the next piece of the image.

§Arguments

  • verifier - the verifier.
  • chunk - the next bytes of the image, in order.
  • len - the length of chunk.

§Returns

PamojaStatus::Ok once the chunk is hashed, or a failure if more bytes have arrived than the manifest declared.

§Safety

verifier must be a live handle from pamoja_image_verifier_new, and chunk must point to at least len readable bytes, or be null when len is 0.