diff --git a/sys/crypto/helper.c b/sys/crypto/helper.c index 9ddbfc47f8..81accc8d29 100644 --- a/sys/crypto/helper.c +++ b/sys/crypto/helper.c @@ -19,7 +19,7 @@ void crypto_block_inc_ctr(uint8_t block[16], int L) } } -int crypto_equals(uint8_t *a, uint8_t *b, size_t len) +int crypto_equals(const uint8_t *a, const uint8_t *b, size_t len) { uint8_t diff = 0; for (size_t i = 0; i < len; ++i, ++a, ++b) { diff --git a/sys/include/crypto/helper.h b/sys/include/crypto/helper.h index 7744dc981d..db0dd42374 100644 --- a/sys/include/crypto/helper.h +++ b/sys/include/crypto/helper.h @@ -47,7 +47,7 @@ void crypto_block_inc_ctr(uint8_t block[16], int L); * * @returns 0 iff the blocks are non-equal. */ -int crypto_equals(uint8_t *a, uint8_t *b, size_t len); +int crypto_equals(const uint8_t *a, const uint8_t *b, size_t len); #ifdef __cplusplus }