rweather / arduinolibs

Arduino Cryptography Library
444 stars 212 forks source link

Error Compiling for ESP8266 or ESP32 clean() not declared in scope AES CFB example #85

Open muhkuhgh opened 10 months ago

muhkuhgh commented 10 months ago

Fresh installation or Arduino IDE. Only ESP Booards and this Lib installed while trying to figure out the problem... C:\(..)\Arduino\libraries\CryptoLegacy\src\CFB.cpp: In destructor 'virtual CFBCommon::~CFBCommon()': C:\(..)\Arduino\libraries\CryptoLegacy\src\CFB.cpp:53:5: error: 'clean' was not declared in this scope; did you mean 'clear'? 53 | clean(iv); | ^~~~~ | clear C:\(..)\Arduino\libraries\CryptoLegacy\src\CFB.cpp: In member function 'virtual void CFBCommon::clear()': C:\(..)\Arduino\libraries\CryptoLegacy\src\CFB.cpp:143:5: error: 'clean' was not declared in this scope; did you mean 'clear'? 143 | clean(iv); | ^~~~~ | clear C:\(..)\Arduino\libraries\CryptoLegacy\src\SHA1.cpp: In destructor 'virtual SHA1::~SHA1()': C:\(..)\Arduino\libraries\CryptoLegacy\src\SHA1.cpp:61:5: error: 'clean' was not declared in this scope; did you mean 'clear'? 61 | clean(state); | ^~~~~ | clear

Also tried it for STM32WL series and getting these errors: C:\Users\(..)\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.6.0\system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wl54xx.h:1166:47: error: expected ')' before '*' token 1166 | #define RNG ((RNG_TypeDef *) RNG_BASE) | ~ ^ C:\(..)\Arduino\libraries\Crypto\RNG.cpp:176:10: note: in expansion of macro 'RNG' 176 | RNGClass RNG; | ^~~ C:\Users\(..)\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.6.0\system/Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wl54xx.h:1166:47: error: expected ')' before '*' token 1166 | #define RNG ((RNG_TypeDef *) RNG_BASE) | ~ ^ C:\(..)\Arduino\libraries\Crypto\RNG.cpp:176:10: note: in expansion of macro 'RNG' 176 | RNGClass RNG; | ^~~ exit status 1 Fehler beim Kompilieren für das Board Generic STM32WL series.

yota9 commented 1 month ago

Had the same problem. Solved by copying Crypto.h to the cryptlegacy src folder.