aboutsummaryrefslogtreecommitdiff
path: root/csprng.c
diff options
context:
space:
mode:
Diffstat (limited to 'csprng.c')
-rw-r--r--csprng.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/csprng.c b/csprng.c
index 08ca794..4fc80d0 100644
--- a/csprng.c
+++ b/csprng.c
@@ -50,6 +50,9 @@ hal_error_t hal_get_random(const hal_core_t *core, void *buffer, const size_t le
hal_error_t err;
size_t i;
+ if ((err = hal_core_check_name(&core, CSPRNG_NAME)) != HAL_OK)
+ return err;
+
for (i = 0; i < length; i += 4) {
const int last = (length - i) < 4;