Skip to main content

pamoja_audit_log_resume

Function pamoja_audit_log_resume 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_audit_log_resume( identity: *const PamojaDeviceIdentity, last: *const PamojaAuditEntry, ) -> *mut PamojaAuditLog
Expand description

Creates a log that carries on from the last entry an earlier one wrote.

This is what a device does after a restart: the chain continues at the next index and hashes onto the entry it left off at, so a reboot leaves no gap for a record to be removed through.

§Arguments

  • identity - the identity whose signature each entry will carry.
  • last - the final entry of the existing log.

§Returns

A handle the caller must release with pamoja_audit_log_free, or null on failure.

§Safety

identity must be a live identity handle, and last a live handle from a call that produced one, or either may be null.