luat_crypto_mini.c 267 B

1234567891011121314
  1. #include "luat_base.h"
  2. #include "luat_crypto.h"
  3. #define LUAT_LOG_TAG "crypto"
  4. #include "luat_log.h"
  5. #include <stdlib.h>
  6. int luat_crypto_trng(char* buff, size_t len) {
  7. for (size_t i = 0; i < len; i++)
  8. {
  9. buff[i] = (char) rand();
  10. }
  11. return 0;
  12. }