Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
direct_bt::SMPLongTermKeyInfo Struct Reference

SMP Long Term Key Info, used for platform agnostic persistence. More...

#include <SMPTypes.hpp>

Collaboration diagram for direct_bt::SMPLongTermKeyInfo:

Public Types

enum  Property : uint8_t { Property::NONE = 0x00 RESPONDER = 0x01, Property::AUTH = 0x02, Property::SC = 0x04 }
 

Public Member Functions

constexpr bool isValid () const noexcept
 
bool isResponder () const noexcept
 
void clear () noexcept
 
std::string toString () const noexcept
 

Static Public Member Functions

static constexpr uint8_t number (const Property rhs) noexcept
 
static std::string getPropertyString (const Property mask) noexcept
 

Public Attributes

Property properties
 SMPLongTermKeyInfo::Property bit mask. More...
 
uint8_t enc_size
 Encryption Size, zero if key is invalid. More...
 
uint16_t ediv
 Encryption Diversifier. More...
 
uint64_t rand
 Random Number. More...
 
jau::uint128_t ltk
 Long Term Key (LTK) More...
 

Detailed Description

SMP Long Term Key Info, used for platform agnostic persistence.

Notable: No endian wise conversion shall occur on this data, since the encryption values are interpreted as a byte stream.

Byte layout must be synchronized with java org.tinyb.SMPLongTermKeyInfo

Definition at line 522 of file SMPTypes.hpp.

Member Enumeration Documentation

◆ Property

Enumerator
NONE 

No specific property.

AUTH 

Authentication used.

SC 

Secure Connection used.

Definition at line 522 of file SMPTypes.hpp.

Member Function Documentation

◆ clear()

void direct_bt::SMPLongTermKeyInfo::clear ( )
inlinenoexcept

Definition at line 522 of file SMPTypes.hpp.

◆ getPropertyString()

std::string SMPLongTermKeyInfo::getPropertyString ( const Property  mask)
staticnoexcept

Definition at line 297 of file SMPTypes.cpp.

Here is the call graph for this function:

◆ isResponder()

bool SMPLongTermKeyInfo::isResponder ( ) const
noexcept

Definition at line 318 of file SMPTypes.cpp.

◆ isValid()

constexpr bool direct_bt::SMPLongTermKeyInfo::isValid ( ) const
inlineconstexprnoexcept

Definition at line 522 of file SMPTypes.hpp.

Here is the caller graph for this function:

◆ number()

static constexpr uint8_t direct_bt::SMPLongTermKeyInfo::number ( const Property  rhs)
inlinestaticconstexprnoexcept

Definition at line 522 of file SMPTypes.hpp.

◆ toString()

std::string direct_bt::SMPLongTermKeyInfo::toString ( ) const
inlinenoexcept

Definition at line 522 of file SMPTypes.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ ediv

uint16_t direct_bt::SMPLongTermKeyInfo::ediv

Encryption Diversifier.

Definition at line 522 of file SMPTypes.hpp.

◆ enc_size

uint8_t direct_bt::SMPLongTermKeyInfo::enc_size

Encryption Size, zero if key is invalid.

Definition at line 522 of file SMPTypes.hpp.

◆ ltk

jau::uint128_t direct_bt::SMPLongTermKeyInfo::ltk

Long Term Key (LTK)

Definition at line 522 of file SMPTypes.hpp.

◆ properties

Property direct_bt::SMPLongTermKeyInfo::properties

SMPLongTermKeyInfo::Property bit mask.

Definition at line 522 of file SMPTypes.hpp.

◆ rand

uint64_t direct_bt::SMPLongTermKeyInfo::rand

Random Number.

Definition at line 522 of file SMPTypes.hpp.


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