chrismoorhouse / ArduinoJWT

Library for encoding and decoding JSON web tokens for the Arduino and ESP8266 platforms.
BSD 3-Clause "New" or "Revised" License
46 stars 21 forks source link

Adding ES256 support (and sketch for the RS256) #7

Open Barmaley13 opened 6 years ago

Barmaley13 commented 6 years ago

Chris,

Yeah, I know there is a lot of changes that I've made. I have not tested it too extensively but it seem to work on my board. I am using ESP8266 and one of the NodeMCU boards. I was not able to compile RS256 example but it might be still possible. I'd say it would be worth trying to pull necessary functions rather than trying to compile the whole axtls-8266 library.

I've added example/test cases and python script that generates keys and key header files for C/C++. I've cleaned up base64 and added functions so it can work with Arduino strings. Also, made some changes to sha256 library. Those changes are not too major, I did those mostly so I can track sha256 instances myself rather have one global one.

There are some files that came with platformio environment, we can ditch those. I don't really care.

What else? Thank you for writing this and sharing in the first place! I really enjoyed contributing to your library. Let me know if my changes look good! :)

All the best, Kirill