Skip to content

Commit

Permalink
Bluefi test
Browse files Browse the repository at this point in the history
  • Loading branch information
h2zero committed Nov 7, 2023
1 parent 2408945 commit 7495d05
Show file tree
Hide file tree
Showing 5 changed files with 740 additions and 2 deletions.
19 changes: 19 additions & 0 deletions main/Zbluefi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#define BLUFI_EXAMPLE_TAG "BLUFI_EXAMPLE"
#define BLUFI_INFO(fmt, ...) ESP_LOGI(BLUFI_EXAMPLE_TAG, fmt, ##__VA_ARGS__)
#define BLUFI_ERROR(fmt, ...) ESP_LOGE(BLUFI_EXAMPLE_TAG, fmt, ##__VA_ARGS__)

extern "C" {
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);

esp_err_t blufi_security_init(void);
void blufi_security_deinit(void);
int esp_blufi_gap_register_callback(void);
esp_err_t esp_blufi_host_init(void);
esp_err_t esp_blufi_host_and_cb_init(esp_blufi_callbacks_t *callbacks);
esp_err_t esp_blufi_host_deinit(void);
}
Loading

0 comments on commit 7495d05

Please sign in to comment.