Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
direct_bt::SMPLongTermKey Struct Reference

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

#include <SMPTypes.hpp>

Collaboration diagram for direct_bt::SMPLongTermKey:

Public Types

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

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

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

Detailed Description

SMP Long Term Key, used for platform agnostic persistence.

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

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

Definition at line 552 of file SMPTypes.hpp.

Member Enumeration Documentation

◆ Property

enum class direct_bt::SMPLongTermKey::Property : uint8_t
strong
Enumerator
NONE 

No specific property.

AUTH 

Authentication used.

SC 

Secure Connection used.

Definition at line 552 of file SMPTypes.hpp.

Member Function Documentation

◆ number()

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

Definition at line 552 of file SMPTypes.hpp.

◆ getPropertyString()

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

Definition at line 286 of file SMPTypes.cpp.

◆ isValid()

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

Definition at line 552 of file SMPTypes.hpp.

Here is the caller graph for this function:

◆ isResponder()

bool SMPLongTermKey::isResponder ( ) const
noexcept

Definition at line 294 of file SMPTypes.cpp.

◆ clear()

void direct_bt::SMPLongTermKey::clear ( )
inlinenoexcept

Definition at line 552 of file SMPTypes.hpp.

Here is the caller graph for this function:

◆ toString()

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

Definition at line 552 of file SMPTypes.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ properties

Property direct_bt::SMPLongTermKey::properties

SMPLongTermKey::Property bit mask.

Definition at line 552 of file SMPTypes.hpp.

◆ enc_size

uint8_t direct_bt::SMPLongTermKey::enc_size

Encryption Size, zero if key is invalid.

Definition at line 552 of file SMPTypes.hpp.

◆ ediv

uint16_t direct_bt::SMPLongTermKey::ediv

Encryption Diversifier.

Definition at line 552 of file SMPTypes.hpp.

◆ rand

uint64_t direct_bt::SMPLongTermKey::rand

Random Number.

Definition at line 552 of file SMPTypes.hpp.

◆ ltk

jau::uint128dp_t direct_bt::SMPLongTermKey::ltk

Long Term Key (LTK)

Definition at line 552 of file SMPTypes.hpp.


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