[][src]Type Definition esp_idf_bindgen::esp_rc4_skip_t

type esp_rc4_skip_t = Option<unsafe extern "C" fn(key: *const c_uchar, keylen: c_uint, skip: c_uint, data: *mut c_uchar, data_len: c_uint) -> c_int>;

@brief XOR RC4 stream to given data with skip-stream-start

@key: RC4 key @keylen: RC4 key length @skip: number of bytes to skip from the beginning of the RC4 stream @data: data to be XOR'ed with RC4 stream @data_len: buf length Returns: 0 on success, -1 on failure

Generate RC4 pseudo random stream for the given key, skip beginning of the stream, and XOR the end result with the data buffer to perform RC4 encryption/decryption.