1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #10218 from bergzand/pr/crypt/helper_equal_const

crypto/helper: Change equals arguments to const
This commit is contained in:
Juan I Carrano 2018-10-23 17:51:56 +02:00 committed by GitHub
commit 8148790e92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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
}