diff --git a/pycardium/mpconfigport.h b/pycardium/mpconfigport.h index cfc5a8a33706eac36b0f0938dd59b430a60a252b..4dd6aa12973b51d839e78d9b106749e74fd3f959 100644 --- a/pycardium/mpconfigport.h +++ b/pycardium/mpconfigport.h @@ -31,7 +31,7 @@ #define MICROPY_MODULE_WEAK_LINKS (1) /* urandom init */ -int mp_hal_trng_read_int(void); +int mp_hal_csprng_read_int(void); /* Builtin function and modules */ #define MICROPY_PY_ALL_SPECIAL_METHODS (1) @@ -43,7 +43,7 @@ int mp_hal_trng_read_int(void); #define MICROPY_PY_UJSON (1) #define MICROPY_PY_URANDOM (1) #define MICROPY_PY_URANDOM_EXTRA_FUNCS (1) -#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (mp_hal_trng_read_int()) +#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (mp_hal_csprng_read_int()) #define MICROPY_PY_URE (1) #define MICROPY_PY_URE_MATCH_GROUPS (1) #define MICROPY_PY_URE_MATCH_SPAN_START_END (1) diff --git a/pycardium/mphalport.c b/pycardium/mphalport.c index 5ae9cee49f60b7c133d3bdd97bc8c3a293d6b29c..4dc043f7d8a130974d1cddc1994e2a6c2634172d 100644 --- a/pycardium/mphalport.c +++ b/pycardium/mphalport.c @@ -294,12 +294,12 @@ void NORETURN nlr_jump_fail(void *val) } /****************************************************************************** - * TRNG + * CSPRNG */ -int mp_hal_trng_read_int(void) +int mp_hal_csprng_read_int(void) { int result; - epic_trng_read((uint8_t *)&result, sizeof(result)); + epic_csprng_read((uint8_t *)&result, sizeof(result)); return result; }