From: Bruno Haible <bruno@clisp.org> Date: Sun, 23 Feb 2020 12:08:14 +0000 (+0100) Subject: crypto/rijndael: Use 'restrict'. X-Git-Tag: v1.0~4211 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=555b03cc26011dbe6364a6eb4efef8fe4837ebc5;p=gnulib.git crypto/rijndael: Use 'restrict'. * lib/rijndael-api-fst.h (rijndaelBlockEncrypt, rijndaelPadEncrypt, rijndaelBlockDecrypt, rijndaelPadDecrypt): Use 'restrict'. * modules/crypto/rijndael (configure.ac): Require AC_C_RESTRICT. --- diff --git a/ChangeLog b/ChangeLog index 22933fc50f..2e51ac6c9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2020-02-23 Bruno Haible <bruno@clisp.org> + crypto/rijndael: Use 'restrict'. + * lib/rijndael-api-fst.h (rijndaelBlockEncrypt, rijndaelPadEncrypt, + rijndaelBlockDecrypt, rijndaelPadDecrypt): Use 'restrict'. + * modules/crypto/rijndael (configure.ac): Require AC_C_RESTRICT. + crypto/arctwo: Use 'restrict'. * lib/arctwo.h (arctwo_encrypt, arctwo_decrypt): Use 'restrict'. * modules/crypto/arctwo (configure.ac): Require AC_C_RESTRICT. diff --git a/lib/rijndael-api-fst.h b/lib/rijndael-api-fst.h index 0553acc3c5..fa5f8d79ce 100644 --- a/lib/rijndael-api-fst.h +++ b/lib/rijndael-api-fst.h @@ -157,7 +157,7 @@ extern int rijndaelBlockEncrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputLen, - char *outBuffer); + char *restrict outBuffer); /* Encrypt data in INPUT, of INPUTOCTETS bytes length, placing the output in the pre-allocated OUTBUFFER which must hold at least @@ -172,7 +172,7 @@ extern int rijndaelPadEncrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputOctets, - char *outBuffer); + char *restrict outBuffer); /* Decrypt data in INPUT, of INPUTLEN/8 bytes length, placing the output in the pre-allocated OUTBUFFER which must hold at least @@ -185,7 +185,7 @@ extern int rijndaelBlockDecrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputLen, - char *outBuffer); + char *restrict outBuffer); /* Decrypt data in INPUT, of INPUTOCTETS bytes length, placing the output in the pre-allocated OUTBUFFER which must hold at least @@ -200,6 +200,6 @@ extern int rijndaelPadDecrypt (rijndaelCipherInstance *cipher, const rijndaelKeyInstance *key, const char *input, size_t inputOctets, - char *outBuffer); + char *restrict outBuffer); #endif /* __RIJNDAEL_API_FST_H */ diff --git a/modules/crypto/rijndael b/modules/crypto/rijndael index c5feae6faf..8dd0ae5e02 100644 --- a/modules/crypto/rijndael +++ b/modules/crypto/rijndael @@ -11,6 +11,7 @@ Depends-on: stdint configure.ac: +AC_REQUIRE([AC_C_RESTRICT]) Makefile.am: lib_SOURCES += rijndael-alg-fst.c rijndael-api-fst.c