Skip to content

Commit 0f02ff3

Browse files
committed
[CI] make printBytes available
1 parent a1894cd commit 0f02ff3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/utility/btct.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ unsigned char const_Rb[16] = {
2626
#define LEN_LTK 16
2727
#define LEN_MAC_KEY 16
2828

29-
#ifdef _BLE_TRACE_
3029
void BluetoothCryptoToolbox::printBytes(uint8_t bytes[], uint8_t length){
30+
#ifdef _BLE_TRACE_
3131
for(int i=0; i<length; i++){
3232
if(i>0){
3333
Serial.print(", 0x");
@@ -37,8 +37,9 @@ void BluetoothCryptoToolbox::printBytes(uint8_t bytes[], uint8_t length){
3737
Serial.print(bytes[i],HEX);
3838
}
3939
Serial.print('\n');
40-
}
4140
#endif
41+
}
42+
4243

4344
int BluetoothCryptoToolbox::f5(uint8_t DHKey[],uint8_t N_master[], uint8_t N_slave[],
4445
uint8_t BD_ADDR_master[], uint8_t BD_ADDR_slave[], uint8_t MacKey[], uint8_t LTK[])

src/utility/btct.h

-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
class BluetoothCryptoToolbox{
77
public:
88
BluetoothCryptoToolbox();
9-
#ifdef _BLE_TRACE_
109
void printBytes(uint8_t bytes[], uint8_t length);
11-
#endif
1210
void generateSubkey(uint8_t* K, uint8_t* K1, uint8_t* K2);
1311
void AES_CMAC ( unsigned char *key, unsigned char *input, int length,
1412
unsigned char *mac );

0 commit comments

Comments
 (0)