summaryrefslogtreecommitdiff
path: root/lib/hmac.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-02-23 13:27:35 +0100
committerBruno Haible <bruno@clisp.org>2020-02-23 13:27:35 +0100
commit7c69c58720bc2b3cdfca4a3d8564f77aa662e576 (patch)
treeaf3d622c4da95548858505d981929c6de0debd74 /lib/hmac.h
parentfd783467d341d2916ef5a798748c2bab20e6ec2a (diff)
downloadgnulib-7c69c58720bc2b3cdfca4a3d8564f77aa662e576.tar.gz
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.
Diffstat (limited to 'lib/hmac.h')
-rw-r--r--lib/hmac.h8
1 files changed, 4 insertions, 4 deletions
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 */