BlueToe
an alternative GATT/BLE implementation
Loading...
Searching...
No Matches
pairing_status.hpp
1#ifndef BLUETOE_SM_PAIRING_STATUS_HPP
2#define BLUETOE_SM_PAIRING_STATUS_HPP
3
4namespace bluetoe {
5
11 enum class device_pairing_status {
12 no_key,
13 unauthenticated_key,
14 authenticated_key,
15 authenticated_key_with_secure_connection
16 };
17
24 {
29
33 device_pairing_status pairing_status;
34
39 : is_encrypted( false )
40 , pairing_status( device_pairing_status::no_key )
41 {
42 }
43
47 constexpr connection_security_attributes( bool encrypted, device_pairing_status status )
48 : is_encrypted( encrypted )
49 , pairing_status( status )
50 {
51 }
52 };
53}
54#endif
the basic security attributes of a connection
Definition: pairing_status.hpp:24
device_pairing_status pairing_status
method that was used to exchange the long term key that is used in the connection
Definition: pairing_status.hpp:33
constexpr connection_security_attributes()
default: not encrypted, no key
Definition: pairing_status.hpp:38
bool is_encrypted
true, if the connection is currently encrypted
Definition: pairing_status.hpp:28
constexpr connection_security_attributes(bool encrypted, device_pairing_status status)
c'tor to initialize both members
Definition: pairing_status.hpp:47