2021-12-06 06:59:55 +00:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2017-03-22 04:36:11 +00:00
|
|
|
#pragma once
|
2016-12-28 04:02:43 +00:00
|
|
|
|
2017-03-22 04:36:11 +00:00
|
|
|
#define BLUFI_EXAMPLE_TAG "BLUFI_EXAMPLE"
|
2020-11-10 07:40:01 +00:00
|
|
|
#define BLUFI_INFO(fmt, ...) ESP_LOGI(BLUFI_EXAMPLE_TAG, fmt, ##__VA_ARGS__)
|
|
|
|
#define BLUFI_ERROR(fmt, ...) ESP_LOGE(BLUFI_EXAMPLE_TAG, fmt, ##__VA_ARGS__)
|
2016-12-28 04:02:43 +00:00
|
|
|
|
|
|
|
void blufi_dh_negotiate_data_handler(uint8_t *data, int len, uint8_t **output_data, int *output_len, bool *need_free);
|
|
|
|
int blufi_aes_encrypt(uint8_t iv8, uint8_t *crypt_data, int crypt_len);
|
|
|
|
int blufi_aes_decrypt(uint8_t iv8, uint8_t *crypt_data, int crypt_len);
|
|
|
|
uint16_t blufi_crc_checksum(uint8_t iv8, uint8_t *data, int len);
|
|
|
|
|
|
|
|
int blufi_security_init(void);
|
|
|
|
void blufi_security_deinit(void);
|
2021-03-31 04:51:48 +00:00
|
|
|
int esp_blufi_gap_register_callback(void);
|
|
|
|
esp_err_t esp_blufi_host_init(void);
|
2021-07-19 10:24:05 +00:00
|
|
|
esp_err_t esp_blufi_host_and_cb_init(esp_blufi_callbacks_t *callbacks);
|