From c57205059e33c6937e8eea54e9b3845b4638ae5e Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 11 Dec 2018 08:29:06 +0100 Subject: [PATCH] Prvni funkcni verze --- src/encipheredEEPROMStrings.cpp | 6 ++---- src/encipheredEEPROMStrings.h | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/encipheredEEPROMStrings.cpp b/src/encipheredEEPROMStrings.cpp index 506d60b..c3fe977 100644 --- a/src/encipheredEEPROMStrings.cpp +++ b/src/encipheredEEPROMStrings.cpp @@ -1,3 +1,5 @@ +#include "encipheredEEPROMStrings.h" +#include #if defined(ESP8266) extern "C" { #include "user_interface.h" @@ -20,7 +22,6 @@ String EES_readString(unsigned int start, size_t maxlen) uint32_t cid = ESP_getChipId(); uint32_t *pkey = (uint32_t *)&key[0]; *pkey = cid; - DEBUG_MSG("Key = %02X:%02X:%02X:%02X\r\n", key[0], key[1], key[2], key[3]); if ((top > 0) && (top < (maxlen - 2))) { uint8_t b; @@ -37,7 +38,6 @@ String EES_readString(unsigned int start, size_t maxlen) b = EEPROM.read(i) ^ key[enciphidx]; if (b != 0) { - DEBUG_MSG("_readString error! (%s)\r\n", result.c_str()); result = F(""); // spatna ukoncovaci nula - neplatny retezec } } @@ -65,7 +65,6 @@ bool EES_storeString(unsigned int start, size_t maxlen, String &string) uint32_t cid = ESP_getChipId(); uint32_t *pkey = (uint32_t *)&key[0]; *pkey = cid; - DEBUG_MSG("Key = %02X:%02X:%02X:%02X\r\n", key[0], key[1], key[2], key[3]); EEPROM.write(start, (uint8_t)top); // ulozime delku retezce (pouzite pr kontrolu pri vycitani) for (i = start + 1; i < start + top + 1; ++i) { @@ -81,4 +80,3 @@ bool EES_storeString(unsigned int start, size_t maxlen, String &string) return result; } - diff --git a/src/encipheredEEPROMStrings.h b/src/encipheredEEPROMStrings.h index 43938a9..cf12441 100644 --- a/src/encipheredEEPROMStrings.h +++ b/src/encipheredEEPROMStrings.h @@ -2,6 +2,7 @@ * Retezce jsou ulozeny jednoduse sifrovane pomoci XOR sifry. * @author Pavel Brychta http://www.xpabo.cz */ +#include /** * @brief Cteni sifrovanych retezcu z EEPROM