intrbiz / arduino-crypto

A minimal crypto library for ESP8266 Arduino
Other
140 stars 54 forks source link

Error : 'RNG' has not been declared. #25

Open ddmakadia1699 opened 4 years ago

ddmakadia1699 commented 4 years ago

Arduino: 1.8.12 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

In file included from C:\Users\Admin\Desktop\sketch_jun13a\sketch_jun13a.ino:1:0:

C:\Users\Admin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.1\cores\esp8266/Crypto.h:749:5: error: 'br_hkdf_context' in namespace '::' does not name a type

 ::br_hkdf_context hkdfContext;

 ^

C:\Users\Admin\Desktop\sketch_jun13a\sketch_jun13a.ino: In function 'void encrypt(char, char, int)':

sketch_jun13a:19:3: error: 'RNG' has not been declared

RNG::fill(iv, BLOCK_SIZE);

^

sketch_jun13a:20:3: error: 'AES' was not declared in this scope

AES aesEncryptor(key, iv, AES::AES_MODE_128, AES::CIPHER_ENCRYPT);

^

sketch_jun13a:20:7: error: expected ';' before 'aesEncryptor'

AES aesEncryptor(key, iv, AES::AES_MODE_128, AES::CIPHER_ENCRYPT);

   ^

sketch_jun13a:21:3: error: 'aesEncryptor' was not declared in this scope

aesEncryptor.process((uint8_t*)plain_text, enciphered, length);

^

C:\Users\Admin\Desktop\sketch_jun13a\sketch_jun13a.ino: In function 'void decrypt(char, char, int)':

sketch_jun13a:35:3: error: 'AES' was not declared in this scope

AES aesDecryptor(key, iv, AES::AES_MODE_128, AES::CIPHER_DECRYPT);

^

sketch_jun13a:35:7: error: expected ';' before 'aesDecryptor'

AES aesDecryptor(key, iv, AES::AES_MODE_128, AES::CIPHER_DECRYPT);

   ^

sketch_jun13a:36:3: error: 'aesDecryptor' was not declared in this scope

aesDecryptor.process((uint8_t*)decoded, deciphered, length);

^

Multiple libraries were found for "base64.hpp" Used: C:\Users\Admin\Documents\Arduino\libraries\base64 Not used: C:\Users\Admin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\base64 exit status 1 'RNG' has not been declared

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

How to solve this error ?

wathui99 commented 4 years ago

I'm getting the same error for this library. But, it was solved by downgrading to arduino 1.8.10

ddmakadia1699 commented 4 years ago

I'm getting the same error for this library. But, it was solved by downgrading to arduino 1.8.10

Thank you for your response. I will try and check it. Thank you

wathui99 commented 4 years ago

Sorry I'm wrong. Try to change board version (2.6.3) instead of arduino IDE version

gaurangkeluskar22 commented 3 years ago

Sorry I'm wrong. Try to change board version (2.6.3) instead of arduino IDE version

Thanks bro , it really works for me !! 🙏🙏🙏