Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Go to the documentation of this file.
26 package org.direct_bt;
105 public static KeyType get(
final String name)
throws IllegalArgumentException {
106 return valueOf(name);
116 case (
byte) 0b00000001:
return ENC_KEY;
117 case (
byte) 0b00000010:
return ID_KEY;
118 case (
byte) 0b00000100:
return SIGN_KEY;
119 case (
byte) 0b00001000:
return LINK_KEY;
120 case (
byte) 0b00010000:
return RFU_1;
121 case (
byte) 0b00100000:
return RFU_2;
122 case (
byte) 0b01000000:
return RFU_3;
123 case (
byte) 0b10000000:
return RFU_4;
124 default:
return NONE;
150 boolean has_pre =
false;
151 final StringBuilder out =
new StringBuilder();
153 for(
int i=0; i<8; i++) {
155 if(
isSet( key_type ) ) {
156 if( has_pre ) { out.append(
", "); }
157 out.append( key_type.toString() );
162 return out.toString();
RFU_1
Reserved for future use.
RFU_4
Reserved for future use.
byte mask
The KeyType bit mask.
LINK_KEY
SMP on the LE transport: Indicate that the device would like to derive the Link Key from the LTK.
boolean isSet(final KeyType bit)
SMP Key Type for Distribution, indicates keys distributed in the Transport Specific Key Distribution ...
SIGN_KEY
Indicates that the device shall distribute CSRK using the Signing Information command.
ENC_KEY
LE legacy pairing: Indicates device shall distribute LTK using the Encryption Information command,...
ID_KEY
Indicates that the device shall distribute IRK using the Identity Information command followed by its...
static KeyType get(final String name)
Maps the specified name to a constant of KeyType.
RFU_2
Reserved for future use.
RFU_3
Reserved for future use.