luat_crypto_idf5.c 233 B

12345678910111213
  1. #include "luat_base.h"
  2. #include "luat_crypto.h"
  3. // 使用ESP自带的随机函数
  4. #include "esp_random.h"
  5. int luat_crypto_trng(char *buff, size_t len)
  6. {
  7. // 直接调用就行了
  8. esp_fill_random(buff, len);
  9. return 0;
  10. }