Include Crypto.c library in my script!
Posted: Thu Sep 20, 2018 8:44 am
Hi,
My question might be dump, but i feel so frustrated for not finding a solution!, please help!
i found this code in Stackoverflow.com
https://stackoverflow.com/questions/453 ... ted-in-php
which uses crypto library in ESP8266
i did some search on google for the library i found the documentation!
https://nodemcu.readthedocs.io/en/maste ... es/crypto/
the problem is!, how to include the library in the code!, i mean it is built in in Arduino right?
i should write
#include <crypto.c>
but it is wrong, i tried several variations!, nothing worked !, my code is this:
#include <crypto.c>
void setup() {
Serial.begin(115200);
Serial.println("\nBooting...");
String key = "1234567812345678";
String data = "abc";
String b64enc = crypto.toBase64(crypto.encrypt("AES-CBC", key, data));
Serial.println(b64enc);
}
void loop() {
// put your main code here, to run repeatedly:
}
still gives error!
fatal error: crypto.c: No such file or directory
#include <crypto.c>
^
Anybody have ideas!, please help!
My question might be dump, but i feel so frustrated for not finding a solution!, please help!
i found this code in Stackoverflow.com
https://stackoverflow.com/questions/453 ... ted-in-php
which uses crypto library in ESP8266
i did some search on google for the library i found the documentation!
https://nodemcu.readthedocs.io/en/maste ... es/crypto/
the problem is!, how to include the library in the code!, i mean it is built in in Arduino right?
i should write
#include <crypto.c>
but it is wrong, i tried several variations!, nothing worked !, my code is this:
#include <crypto.c>
void setup() {
Serial.begin(115200);
Serial.println("\nBooting...");
String key = "1234567812345678";
String data = "abc";
String b64enc = crypto.toBase64(crypto.encrypt("AES-CBC", key, data));
Serial.println(b64enc);
}
void loop() {
// put your main code here, to run repeatedly:
}
still gives error!
fatal error: crypto.c: No such file or directory
#include <crypto.c>
^
Anybody have ideas!, please help!