-->
Page 1 of 1

Include Crypto.c library in my script!

PostPosted: Thu Sep 20, 2018 8:44 am
by Tito781227
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!

Re: Include Crypto.c library in my script!

PostPosted: Thu Sep 20, 2018 9:18 am
by rudy
Tito781227 wrote: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?


That is not Arduino. That is Lua. Completely different.

Re: Include Crypto.c library in my script!

PostPosted: Thu Sep 20, 2018 9:40 am
by Tito781227
rudy wrote:
Tito781227 wrote: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?


That is not Arduino. That is Lua. Completely different.


Omg!, i feel so stupid :S

Thank you very much :)