Refactor all secrets into separate file
This commit is contained in:
parent
53b75a1ba8
commit
9eb66bf59d
|
@ -0,0 +1,14 @@
|
||||||
|
#ifndef _SECRETS_
|
||||||
|
#define _SECRETS_
|
||||||
|
|
||||||
|
static uint32_t const meshkey[4] = {
|
||||||
|
0x00000042, 0x000005ec, 0x00000023, 0x00000005
|
||||||
|
};
|
||||||
|
static const uint32_t openbeaconkey[4] = {
|
||||||
|
0xB4595344, 0xD3E119B6, 0xA814D0EC, 0xEFF5A24E
|
||||||
|
};
|
||||||
|
static uint32_t const remotekey[4] = {
|
||||||
|
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -23,13 +23,7 @@
|
||||||
#define BEACON_CHANNEL 81
|
#define BEACON_CHANNEL 81
|
||||||
#define BEACON_MAC "\x1\x2\x3\x2\1"
|
#define BEACON_MAC "\x1\x2\x3\x2\1"
|
||||||
|
|
||||||
uint32_t const beaconkey[4] = {
|
#include "SECRETS"
|
||||||
0xB4595344,0xD3E119B6,0xA814D0EC,0xEFF5A24E
|
|
||||||
};
|
|
||||||
uint32_t remotekey[4] = {
|
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
|
|
||||||
};
|
|
||||||
extern uint32_t const meshkey[4];
|
|
||||||
|
|
||||||
char funkencrypt=0;
|
char funkencrypt=0;
|
||||||
|
|
||||||
|
@ -167,7 +161,7 @@ int process(char * input){
|
||||||
config.maclen[0]=0x10;
|
config.maclen[0]=0x10;
|
||||||
config.nrmacs=1;
|
config.nrmacs=1;
|
||||||
nrf_config_set(&config);
|
nrf_config_set(&config);
|
||||||
memcpy(thekey,beaconkey,sizeof(thekey));
|
memcpy(thekey,openbeaconkey,sizeof(thekey));
|
||||||
funkencrypt=1;
|
funkencrypt=1;
|
||||||
}else if(input[1]=='?'){
|
}else if(input[1]=='?'){
|
||||||
nrf_config_get(&config);
|
nrf_config_get(&config);
|
||||||
|
|
|
@ -14,9 +14,7 @@ char meshmsg=0;
|
||||||
char meshnice=0;
|
char meshnice=0;
|
||||||
MPKT meshbuffer[MESHBUFSIZE];
|
MPKT meshbuffer[MESHBUFSIZE];
|
||||||
|
|
||||||
uint32_t const meshkey[4] = {
|
#include "SECRETS"
|
||||||
0x00000042, 0x000005ec, 0x00000023, 0x00000005
|
|
||||||
};
|
|
||||||
|
|
||||||
struct NRF_CFG oldconfig;
|
struct NRF_CFG oldconfig;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "basic/uuid.h"
|
#include "basic/uuid.h"
|
||||||
|
|
||||||
//const uint32_t key[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF};
|
//const uint32_t key[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF};
|
||||||
const uint32_t openbeaconkey[4] = { 0xB4595344,0xD3E119B6,0xA814D0EC,0xEFF5A24E };
|
#include "SECRETS"
|
||||||
const uint8_t useencryption = 1;
|
const uint8_t useencryption = 1;
|
||||||
const uint8_t mac[5] = {1,2,3,2,1};
|
const uint8_t mac[5] = {1,2,3,2,1};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue