I’m working on an application for the Wio Terminal, storing sensor data directly into Azure Storage Tables.
In this App I need some cryptografic functions (MD5 hash, SHA256 hash, base64 encoding and -decoding).
I have the application in its basic functions already working on the Wio Terminal using the atWiFi Api, were I could use the above listed cryptographic functions from the Seeed_Arduino_mbedtls library.
Now I’m trying to switch to the new rpcWiFi api but it seems that I can not longer use the functions of the Seeed_Arduino_mbedtls library since the mbedtls functions are now included in the Seeed_Arduino_rpcUnified library and it seems to me, that the above named functions
are not included. As I think, I cannot use the Seeed_Arduino_mbedtls library besides the Seeed_Arduino_rpcUnified library since Seeed_Arduino_mbedtls has a dependency to the Seeed_Arduino_atUnified library.
Is there a way how the needed functions can easily be provided in conjunction with new rpcWiFi api?
I found a preliminary solution:
I copied these files from the Seeed_Arduino_mbedtls library (md5.c, platform_util.c, base64.c, md.c, md_wrap.c, ripemd160.c, sha1.c, sha256.c and sha512.c) in the PlatformIO folder: .pio/libdeps/… Seeed Arduino rpcUnified/src/rtl_wifi and made a little modification to the header file ‘platform_util.h’ in the folder .pio/libdeps/…/src/mbedtls
However it would be nice if these libraries could be used without this hack.
Yes, we are working on this mbedtls library, please check the dev branch for this. https://github.com/Seeed-Studio/Seeed_Arduino_mbedtls/tree/dev
Using the files from the Seeed_arduino_mbedtls dev branch worked for me.
On PlatformIO I had to copy the library files manually in the .pio/libdeps folder, maybe that the automatic installation through PlatformIO works only for files from the master branch
Now the situations is that some users still using the AT-command and so the master branch need to stay no move…
But we will figure something out