Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
org.direct_bt.SMPLinkKey Class Reference

Local SMP Link Key, used for platform agnostic persistence, mapping to platform specific link keys format. More...

Collaboration diagram for org.direct_bt.SMPLinkKey:

Classes

enum  KeyType
 Link Key Types compatible with Mgmt's MgmtLinkKeyType and hence MgmtLinkKeyInfo. More...
 

Public Member Functions

 SMPLinkKey ()
 Construct emoty unset instance. More...
 
 SMPLinkKey (final byte source[], final int pos)
 Construct instance via given source byte array. More...
 
void get (final byte[] source, int pos)
 Method transfers all bytes representing a SMPLinkKeyInfo from the given source array at the given position into this instance. More...
 
final boolean isResponder ()
 
final boolean isValid ()
 
final void put (final byte[] sink, int pos)
 Method transfers all bytes representing this instance into the given destination array at the given position. More...
 
String toString ()
 

Public Attributes

byte key []
 Link key. More...
 
byte pin_length
 Pin length. More...
 
boolean responder
 Responder (ll slave) flag. More...
 
KeyType type
 KeyType value. More...
 

Static Public Attributes

static final int byte_size = 1+1+16+1
 Size of the byte stream representation in bytes. More...
 

Detailed Description

Local SMP Link Key, used for platform agnostic persistence, mapping to platform specific link keys format.

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 native direct_bt::SMPLinkKeyInfo

Since
2.4.0

Definition at line 42 of file SMPLinkKey.java.

Constructor & Destructor Documentation

◆ SMPLinkKey() [1/2]

org.direct_bt.SMPLinkKey.SMPLinkKey ( final byte  source[],
final int  pos 
)

Construct instance via given source byte array.

Definition at line 129 of file SMPLinkKey.java.

◆ SMPLinkKey() [2/2]

org.direct_bt.SMPLinkKey.SMPLinkKey ( )

Construct emoty unset instance.

Definition at line 135 of file SMPLinkKey.java.

Member Function Documentation

◆ get()

void org.direct_bt.SMPLinkKey.get ( final byte[]  source,
int  pos 
)

Method transfers all bytes representing a SMPLinkKeyInfo from the given source array at the given position into this instance.

Implementation is consistent with put(byte[], int).

Parameters
sourcethe source array
posstarting position in the source array
See also
put(byte[], int)

Definition at line 152 of file SMPLinkKey.java.

Here is the caller graph for this function:

◆ put()

final void org.direct_bt.SMPLinkKey.put ( final byte[]  sink,
int  pos 
)

Method transfers all bytes representing this instance into the given destination array at the given position.

Implementation is consistent with SMPLinkKeyInfo(byte[], int).

Parameters
sinkthe destination array
posstarting position in the destination array
See also
#SMPLinkKeyInfo(byte[], int)
get(byte[], int)

Definition at line 173 of file SMPLinkKey.java.

Here is the caller graph for this function:

◆ isValid()

final boolean org.direct_bt.SMPLinkKey.isValid ( )

Definition at line 183 of file SMPLinkKey.java.

Here is the caller graph for this function:

◆ isResponder()

final boolean org.direct_bt.SMPLinkKey.isResponder ( )

Definition at line 185 of file SMPLinkKey.java.

◆ toString()

String org.direct_bt.SMPLinkKey.toString ( )

Definition at line 188 of file SMPLinkKey.java.

Here is the caller graph for this function:

Member Data Documentation

◆ responder

boolean org.direct_bt.SMPLinkKey.responder

Responder (ll slave) flag.

Definition at line 111 of file SMPLinkKey.java.

◆ type

KeyType org.direct_bt.SMPLinkKey.type

KeyType value.

Definition at line 114 of file SMPLinkKey.java.

◆ key

byte org.direct_bt.SMPLinkKey.key[]

Link key.

Definition at line 117 of file SMPLinkKey.java.

◆ pin_length

byte org.direct_bt.SMPLinkKey.pin_length

Pin length.

Definition at line 120 of file SMPLinkKey.java.

◆ byte_size

final int org.direct_bt.SMPLinkKey.byte_size = 1+1+16+1
static

Size of the byte stream representation in bytes.

See also
put(byte[], int)

Definition at line 126 of file SMPLinkKey.java.


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