Skip to main content

pamoja_session_hkdf_sha256

Function pamoja_session_hkdf_sha256 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_session_hkdf_sha256( salt: *const u8, salt_len: usize, ikm: *const u8, ikm_len: usize, info: *const u8, info_len: usize, out: *mut u8, out_len: usize, ) -> PamojaStatus
Expand description

Expands input keying material into as many bytes as are asked for.

§Arguments

  • salt - the salt, which may be empty.
  • salt_len - the length of salt.
  • ikm - the input keying material.
  • ikm_len - the length of ikm.
  • info - context binding the output to its purpose, which may be empty.
  • info_len - the length of info.
  • out - receives out_len derived bytes.
  • out_len - how many bytes to derive.

§Returns

PamojaStatus::Ok on success.

§Safety

salt, ikm, and info must each point to at least their stated lengths of readable bytes, or be null when those lengths are 0, and out must point to at least out_len writable bytes, or be null when out_len is 0.