BlueToe
an alternative GATT/BLE implementation
Loading...
Searching...
No Matches
bluetoe::bonding_data_base< Obj, obj > Struct Template Reference

access to a user defined key data base More...

#include <bluetoe/sm/include/bluetoe/security_manager.hpp>

Detailed Description

template<class Obj, Obj & obj>
struct bluetoe::bonding_data_base< Obj, obj >

access to a user defined key data base

The provided implementation has to implement the following functions:

template < class Radio > longterm_key_t create_new_bond( Radio& radio, const bluetoe::link_layer::device_address& mac );

void store_bond( const bluetoe::details::longterm_key_t& key, const bluetoe::link_layer::device_address& mac)

std::pair< bool, details::uint128_t > find_key( std::uint16_t ediv, std::uint64_t rand, const bluetoe::link_layer::device_address& remote_address ) const;

template < class Connection > void restore_cccds( Connection& connection );

create_new_bond() is used to create a longterm key für a bond with the given device. radio can be used to generate random numbers.

store_bond() is used to store a key that was either created by store_bond(), or during the LESC paring process.

find_key() will be called to lookup a stored long term key. If it does not exists, the function should return a pair with the first member set to false.

This will also set bonding flags in the pairing response to "Bonding".

Template Parameters
Objtype that implements the given requirements
objinstance that implements the given requirements

The documentation for this struct was generated from the following file: