[][src]Type Definition esp_idf_bindgen::esp_pbkdf2_sha1_t

type esp_pbkdf2_sha1_t = Option<unsafe extern "C" fn(passphrase: *const c_char, ssid: *const c_char, ssid_len: c_uint, iterations: c_int, buf: *mut c_uchar, buflen: c_uint) -> c_int>;

@brief SHA1-based key derivation function (PBKDF2) for IEEE 802.11i

@passphrase: ASCII passphrase @ssid: SSID @ssid_len: SSID length in bytes @iterations: Number of iterations to run @buf: Buffer for the generated key @buflen: Length of the buffer in bytes Returns: 0 on success, -1 of failure

This function is used to derive PSK for WPA-PSK. For this protocol, iterations is set to 4096 and buflen to 32. This function is described in IEEE Std 802.11-2004, Clause H.4. The main construction is from PKCS#5 v2.0.