mirror of
https://github.com/kamilsss655/uv-k5-firmware-custom
synced 2024-11-21 17:57:59 +00:00
fix key length to 16 bytes, cleaning
This commit is contained in:
parent
b1cbcccbd5
commit
5b02ce3e90
@ -487,7 +487,9 @@ void MENU_AcceptSetting(void)
|
||||
|
||||
#ifdef ENABLE_ENCRYPTION
|
||||
case MENU_ENC_KEY:
|
||||
memset(gEeprom.ENC_KEY, 0, sizeof(gEeprom.ENC_KEY));
|
||||
memmove(gEeprom.ENC_KEY, edit, sizeof(edit));
|
||||
memset(edit, 0, sizeof(edit));
|
||||
gUpdateStatus = true;
|
||||
break;
|
||||
#endif
|
||||
|
@ -271,7 +271,6 @@ void SETTINGS_SaveChannelName(uint8_t channel, const char * name)
|
||||
#ifdef ENABLE_ENCRYPTION
|
||||
void SETTINGS_SaveEncryptionKey()
|
||||
{
|
||||
// TODO: this should probably autoadjust to sizeof(gEeprom.ENC_KEY)
|
||||
EEPROM_WriteBuffer(0x0F30, gEeprom.ENC_KEY, true);
|
||||
EEPROM_WriteBuffer(0x0F38, gEeprom.ENC_KEY + 8, true);
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ typedef struct {
|
||||
uint8_t PASSWORD_WRONG_ATTEMPTS;
|
||||
#endif
|
||||
#ifdef ENABLE_ENCRYPTION
|
||||
char ENC_KEY[32];
|
||||
char ENC_KEY[16];
|
||||
#endif
|
||||
uint16_t VOX1_THRESHOLD;
|
||||
uint16_t VOX0_THRESHOLD;
|
||||
|
Loading…
Reference in New Issue
Block a user