summaryrefslogtreecommitdiff
path: root/lib/sm3.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-02-23 13:25:28 +0100
committerBruno Haible <bruno@clisp.org>2020-02-23 13:25:28 +0100
commitfd783467d341d2916ef5a798748c2bab20e6ec2a (patch)
tree60706894bf468b889aaaaafaff6c1211cbc8ecc0 /lib/sm3.h
parent7d4a2b0c17628cc4e5fc159b26498564706ee1be (diff)
downloadgnulib-fd783467d341d2916ef5a798748c2bab20e6ec2a.tar.gz
crypto/sm3: Use 'restrict'.
* lib/sm3.h (sm3_finish_ctx, sm3_read_ctx, sm3_buffer): Use 'restrict'. * m4/sm3.m4 (gl_SM3): Require AC_C_RESTRICT.
Diffstat (limited to 'lib/sm3.h')
-rw-r--r--lib/sm3.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/sm3.h b/lib/sm3.h
index e0bdd900db..fd7cc981d6 100644
--- a/lib/sm3.h
+++ b/lib/sm3.h
@@ -75,18 +75,19 @@ extern void sm3_process_bytes (const void *buffer, size_t len,
in first 32 bytes following RESBUF. The result is always in little
endian byte order, so that a byte-wise output yields to the wanted
ASCII representation of the message digest. */
-extern void *sm3_finish_ctx (struct sm3_ctx *ctx, void *resbuf);
+extern void *sm3_finish_ctx (struct sm3_ctx *ctx, void *restrict resbuf);
/* Put result from CTX in first 32 bytes following RESBUF. The result is
always in little endian byte order, so that a byte-wise output yields
to the wanted ASCII representation of the message digest. */
-extern void *sm3_read_ctx (const struct sm3_ctx *ctx, void *resbuf);
+extern void *sm3_read_ctx (const struct sm3_ctx *ctx, void *restrict resbuf);
/* Compute SM3 message digest for LEN bytes beginning at BUFFER. The
result is always in little endian byte order, so that a byte-wise
output yields to the wanted ASCII representation of the message
digest. */
-extern void *sm3_buffer (const char *buffer, size_t len, void *resblock);
+extern void *sm3_buffer (const char *buffer, size_t len,
+ void *restrict resblock);
# endif
/* Compute SM3 message digest for bytes read from STREAM. The