Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
org.direct_bt.SMPLongTermKeyInfo Class Reference

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

Collaboration diagram for org.direct_bt.SMPLongTermKeyInfo:

Classes

class  Properties
 SMPLongTermKeyInfo PropertyType Bit Mask More...
 
enum  PropertyType
 SMPLongTermKeyInfo Property Bits More...
 

Public Member Functions

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

Public Attributes

Properties properties
 Properties bit mask. More...
 
byte enc_size
 Encryption Size, 1 octets or 8 bits. More...
 
byte ediv []
 Encryption Diversifier, 2 octets or 16 bits. More...
 
byte rand []
 Random Number, 8 octets or 64 bits. More...
 
byte ltk []
 Long Term Key (LTK), 16 octets or 128 bits. More...
 

Static Public Attributes

static final int byte_size = 1+1+2+8+16
 Size of the byte stream representation in bytes (28) 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 native direct_bt::SMPLongTermKeyInfo

Since
2.2.0

Definition at line 39 of file SMPLongTermKeyInfo.java.

Constructor & Destructor Documentation

◆ SMPLongTermKeyInfo() [1/2]

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

Construct instance via given source byte array.

Definition at line 142 of file SMPLongTermKeyInfo.java.

Here is the call graph for this function:

◆ SMPLongTermKeyInfo() [2/2]

org.direct_bt.SMPLongTermKeyInfo.SMPLongTermKeyInfo ( )

Construct emoty unset instance.

Definition at line 153 of file SMPLongTermKeyInfo.java.

Member Function Documentation

◆ getStream()

final void org.direct_bt.SMPLongTermKeyInfo.getStream ( 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 SMPLongTermKeyInfo(byte[], int).

Parameters
sinkthe destination array
posstarting position in the destination array
See also
SMPLongTermKeyInfo(byte[], int)
putStream(byte[], int)

Definition at line 194 of file SMPLongTermKeyInfo.java.

Here is the caller graph for this function:

◆ isResponder()

final boolean org.direct_bt.SMPLongTermKeyInfo.isResponder ( )

Definition at line 208 of file SMPLongTermKeyInfo.java.

Here is the call graph for this function:

◆ isValid()

final boolean org.direct_bt.SMPLongTermKeyInfo.isValid ( )

Definition at line 206 of file SMPLongTermKeyInfo.java.

Here is the caller graph for this function:

◆ putStream()

void org.direct_bt.SMPLongTermKeyInfo.putStream ( final byte[]  source,
int  pos 
)

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

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

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

Definition at line 171 of file SMPLongTermKeyInfo.java.

Here is the caller graph for this function:

◆ toString()

String org.direct_bt.SMPLongTermKeyInfo.toString ( )

Definition at line 211 of file SMPLongTermKeyInfo.java.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ byte_size

final int org.direct_bt.SMPLongTermKeyInfo.byte_size = 1+1+2+8+16
static

Size of the byte stream representation in bytes (28)

See also
getStream(byte[], int)

Definition at line 139 of file SMPLongTermKeyInfo.java.

◆ ediv

byte org.direct_bt.SMPLongTermKeyInfo.ediv[]

Encryption Diversifier, 2 octets or 16 bits.

Definition at line 129 of file SMPLongTermKeyInfo.java.

◆ enc_size

byte org.direct_bt.SMPLongTermKeyInfo.enc_size

Encryption Size, 1 octets or 8 bits.

Is zero if key is invalid.

Definition at line 127 of file SMPLongTermKeyInfo.java.

◆ ltk

byte org.direct_bt.SMPLongTermKeyInfo.ltk[]

Long Term Key (LTK), 16 octets or 128 bits.

Definition at line 133 of file SMPLongTermKeyInfo.java.

◆ properties

Properties org.direct_bt.SMPLongTermKeyInfo.properties

Properties bit mask.

1 octet or 8 bits.

Definition at line 124 of file SMPLongTermKeyInfo.java.

◆ rand

byte org.direct_bt.SMPLongTermKeyInfo.rand[]

Random Number, 8 octets or 64 bits.

Definition at line 131 of file SMPLongTermKeyInfo.java.


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