suculent / thinx-aes-lib

AES wrapper for ESP8266/ESP32/Arduino/nRF5x
Other
113 stars 39 forks source link

Fix simple.ino example #49

Closed johnny-y-wang closed 3 years ago

johnny-y-wang commented 3 years ago

I was playing around with the simple.ino example file and I ran into an issue with decrypt_to_cleartext. The issue is similar to what #46 described. I wrote a quick patch to fix the example code and wanted to send it upstream.

The aesLib.decrypt function expects a raw input. This change performs base64 decode before feeding encrypted data into decrypt_to_cleartext.

suculent commented 3 years ago

Thanks a lot.

suculent commented 3 years ago

OK, so don't know why/how exactly but the encrypt function did accidentally include base64 conversion. It should not be there so I've removed it. After that change, the simple example forks as expected again.