Refactor all secrets into separate file

This commit is contained in:
Stefan `Sec` Zehl 2011-08-05 03:18:43 +02:00
parent 53b75a1ba8
commit 9eb66bf59d
4 changed files with 18 additions and 12 deletions

14
firmware/SECRETS Normal file
View File

@ -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

View File

@ -23,13 +23,7 @@
#define BEACON_CHANNEL 81
#define BEACON_MAC "\x1\x2\x3\x2\1"
uint32_t const beaconkey[4] = {
0xB4595344,0xD3E119B6,0xA814D0EC,0xEFF5A24E
};
uint32_t remotekey[4] = {
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
};
extern uint32_t const meshkey[4];
#include "SECRETS"
char funkencrypt=0;
@ -167,7 +161,7 @@ int process(char * input){
config.maclen[0]=0x10;
config.nrmacs=1;
nrf_config_set(&config);
memcpy(thekey,beaconkey,sizeof(thekey));
memcpy(thekey,openbeaconkey,sizeof(thekey));
funkencrypt=1;
}else if(input[1]=='?'){
nrf_config_get(&config);

View File

@ -14,9 +14,7 @@ char meshmsg=0;
char meshnice=0;
MPKT meshbuffer[MESHBUFSIZE];
uint32_t const meshkey[4] = {
0x00000042, 0x000005ec, 0x00000023, 0x00000005
};
#include "SECRETS"
struct NRF_CFG oldconfig;

View File

@ -7,7 +7,7 @@
#include "basic/uuid.h"
//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 mac[5] = {1,2,3,2,1};