keys.h 839 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: LGPL-2.1-or-later */
  2. /*
  3. *
  4. * BlueZ - Bluetooth protocol stack for Linux
  5. *
  6. * Copyright (C) 2017 Intel Corporation. All rights reserved.
  7. *
  8. *
  9. */
  10. #define KR_PHASE_NONE 0x00
  11. #define KR_PHASE_ONE 0x01
  12. #define KR_PHASE_TWO 0x02
  13. #define KR_PHASE_INVALID 0xff
  14. bool keys_app_key_add(uint16_t net_idx, uint16_t app_idx, uint8_t *key,
  15. bool update);
  16. bool keys_net_key_add(uint16_t index, uint8_t *key, bool update);
  17. uint16_t keys_app_key_get_bound(uint16_t app_idx);
  18. uint8_t *keys_app_key_get(uint16_t app_idx, bool current);
  19. uint8_t *keys_net_key_get(uint16_t net_idx, bool current);
  20. bool keys_app_key_delete(uint16_t app_idx);
  21. bool keys_net_key_delete(uint16_t net_idx);
  22. uint8_t keys_get_kr_phase(uint16_t net_idx);
  23. bool keys_set_kr_phase(uint16_t index, uint8_t phase);
  24. void keys_cleanup_all(void);