立即使用 SDK 2_20_00_06为 cc1310电路板开发一个新应用。
如何生成随机字节。
谢谢
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.
尊敬的 Yan:
如果您正在处理新的应用、我会建议您使用最新的 SDK、4.20。 链接: https://www.ti.com/tool/SIMPLELINK-CC13X0-SDK
您可以使用 TRNG 驱动程序。 请查看文档: https://dev.ti.com/tirex/content/simplelink_cc13x0_sdk_4_20_02_07/docs/tidrivers/doxygen/html/_t_r_n_g_c_c26_x_x_8h.html
谢谢、
M·H
尊敬的 Yan:
您可以在此处找到代码片段、然后向下滚动至示例: https://dev.ti.com/tirex/content/simplelink_cc13x0_sdk_4_20_02_07/docs/tidrivers/doxygen/html/_t_r_n_g_8h.html
// Import TRNG Driver definitions #include <ti/drivers/TRNG.h> #include <ti/drivers/cryptoutils/cryptokey/CryptoKeyPlaintext.h> // Define name for TRNG channel index #define TRNG_INSTANCE 0 #define KEY_LENGTH_BYTES 16 TRNG_init(); handle = TRNG_open(TRNG_INSTANCE, NULL); CryptoKeyPlaintext_initBlankKey(&entropyKey, entropyBuffer, KEY_LENGTH_BYTES); result = TRNG_generateEntropy(handle, &entropyKey); TRNG_close(handle);
谢谢、
M·H