From 7c69c58720bc2b3cdfca4a3d8564f77aa662e576 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 23 Feb 2020 13:27:35 +0100 Subject: crypto/hmac-*: Use 'restrict'. * lib/hmac.h (hmac_md5, hmac_sha1, hmac_sha256, hmac_sha512): Use 'restrict'. * modules/crypto/hmac-md5 (configure.ac): Require AC_C_RESTRICT. * modules/crypto/hmac-sha1 (configure.ac): Likewise. * modules/crypto/hmac-sha256 (configure.ac): Likewise. * modules/crypto/hmac-sha512 (configure.ac): Likewise. --- lib/hmac.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/hmac.h') diff --git a/lib/hmac.h b/lib/hmac.h index a39070221f..135eb2a8b0 100644 --- a/lib/hmac.h +++ b/lib/hmac.h @@ -27,7 +27,7 @@ RESBUF buffer. Return 0 on success. */ int hmac_md5 (const void *key, size_t keylen, - const void *buffer, size_t buflen, void *resbuf); + const void *buffer, size_t buflen, void *restrict resbuf); /* Compute Hashed Message Authentication Code with SHA-1, over BUFFER data of BUFLEN bytes using the KEY of KEYLEN bytes, writing the @@ -35,7 +35,7 @@ hmac_md5 (const void *key, size_t keylen, success. */ int hmac_sha1 (const void *key, size_t keylen, - const void *in, size_t inlen, void *resbuf); + const void *in, size_t inlen, void *restrict resbuf); /* Compute Hashed Message Authentication Code with SHA-256, over BUFFER data of BUFLEN bytes using the KEY of KEYLEN bytes, writing the @@ -43,7 +43,7 @@ hmac_sha1 (const void *key, size_t keylen, success. */ int hmac_sha256 (const void *key, size_t keylen, - const void *in, size_t inlen, void *resbuf); + const void *in, size_t inlen, void *restrict resbuf); /* Compute Hashed Message Authentication Code with SHA-512, over BUFFER data of BUFLEN bytes using the KEY of KEYLEN bytes, writing the @@ -51,6 +51,6 @@ hmac_sha256 (const void *key, size_t keylen, success. */ int hmac_sha512 (const void *key, size_t keylen, - const void *in, size_t inlen, void *resbuf); + const void *in, size_t inlen, void *restrict resbuf); #endif /* HMAC_H */ -- cgit v1.2.1