This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
Hi, I want to include Windows.h and wincrypt.h, because i'm using mbedtls library for encryption and decryption in that mbedtls using this files.
I add mbedtls .c and .h files in my CCS project i when i try to build it i got errors as below
#error "Platform entropy sources only work on Unix and Windows, see MBEDTLS_NO_PLATFORM_ENTROPY in config.h"
#error "This module only works on Unix and Windows, see MBEDTLS_NET_C in config.h"
#error "This module only works on Unix and Windows, see MBEDTLS_TIMING_C in config.h"
#include <sys/stat.h> cannot open this file
i build the mbedtls in Visual studio, it is working fine , when i added the same files i'm getting errors as above in VS a predefined macro was add in pre-processor _WIN32 if define in pre processor i got error
cannot open this file windows.h
can any one suggest me how to solve this problems
I am not familiar with the mbedtls library. But it is likely that is not documented or tested to be used in a system that lacks a hosted operating system such as Unix or Windows.
Thanks and regards,
-George
Thanks for the reply
I want implement JWT in CC3220SF i tried with Visual studio encryption and decryption were successful. the code i used uses mbedtls library.
when i tried to add this in CCS sample code it give above mentioned errors.
Is there any other way to implement JWT in cc3220sf
Hi,
The CC32xx devices has a NWP built into the part, allowing for tls/tcp connections without the need for this library. Please review our getting started guide to understand how our device is architected and how to move forward.
BR,
Vince
Thanks for the suggestion Vincent Rodriguez,
Can i use cryptohmac_CC3220SF_LAUNCHXL_tirtos_ccs sample code for encryption of data that use HS256 algorithm in jwt encryption of signature
1. JWT needs header i can create Header using Json libaray
2. JWT payload i get from http request
3. header and payload are converted to base64 then padded with delimiter "." ex base64(header) + "." base64(payload)
4. Finial encryption HMACSHA256( base64(header) + "." base64(payload) , secrectkey )
for finial step can i use the CryptoCC32XX_sign() API or any other API is available.
Yes, this should be possible.
Take a look at our crypto utilities section of the programmers guide - Pg. 252 https://www.ti.com/lit/ug/swru455l/swru455l.pdf?ts=1599593490578&ref_url=https%253A%252F%252Fwww.google.com%252F
BR,
Vince