commit e3fe01ca337c144b118d93b6930b6e9ac90864c3
parent ad7bfa1e842c8493880a860b7275048ba5dc730c
Author: Kévin Le Gouguec <kevin.legouguec@airbus.com>
Date: Thu, 22 Nov 2018 11:02:01 +0100
Remplacement des #pragma once par des include guards
La flemme de réfléchir aux problèmes de portabilité.
Diffstat:
6 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/crypto_aead/lilliputaei128v1/ref/cipher.h b/crypto_aead/lilliputaei128v1/ref/cipher.h
@@ -1,4 +1,5 @@
-#pragma once
+#ifndef CIPHER_H
+#define CIPHER_H
#include <stdio.h> /* debug */
#include <stdint.h>
@@ -25,3 +26,5 @@ void lilliput_tbc_decrypt(
uint8_t message[BLOCK_BYTES],
FILE *debug
);
+
+#endif /* CIPHER_H */
diff --git a/crypto_aead/lilliputaei128v1/ref/constants.h b/crypto_aead/lilliputaei128v1/ref/constants.h
@@ -1,4 +1,5 @@
-#pragma once
+#ifndef CONSTANTS_H
+#define CONSTANTS_H
#include <stdint.h>
@@ -11,3 +12,5 @@ extern const uint8_t P[6][256];
/* Lilliput S-box */
extern const uint8_t S[256];
+
+#endif /* CONSTANTS_H */
diff --git a/crypto_aead/lilliputaei128v1/ref/debug.h b/crypto_aead/lilliputaei128v1/ref/debug.h
@@ -1,4 +1,5 @@
-#pragma once
+#ifndef DEBUG_H
+#define DEBUG_H
#include <inttypes.h>
#include <stdio.h>
@@ -45,3 +46,5 @@ static inline void debug_dump_buffer(FILE *output, const char *header, size_t le
}
fprintf(output, "\n");
}
+
+#endif /* DEBUG_H */
diff --git a/crypto_aead/lilliputaei128v1/ref/parameters.h b/crypto_aead/lilliputaei128v1/ref/parameters.h
@@ -1,4 +1,5 @@
-#pragma once
+#ifndef PARAMETERS_H
+#define PARAMETERS_H
#include <stdint.h>
@@ -14,3 +15,5 @@
#define ROUND_TWEAKEY_BYTES (ROUND_TWEAKEY_LENGTH_BITS/8)
#define ROUNDS 32
+
+#endif /* PARAMETERS_H */
diff --git a/crypto_aead/lilliputaei128v1/ref/test/helpers.h b/crypto_aead/lilliputaei128v1/ref/test/helpers.h
@@ -1,4 +1,5 @@
-#pragma once
+#ifndef HELPERS_H
+#define HELPERS_H
#include <stdint.h>
#include <stdio.h>
@@ -18,3 +19,5 @@ static inline FILE* open_dump_file(const char *folder, const char* vector, const
}
+
+#endif /* HELPERS_H */
diff --git a/crypto_aead/lilliputaei128v1/ref/tweakey.h b/crypto_aead/lilliputaei128v1/ref/tweakey.h
@@ -1,4 +1,5 @@
-#pragma once
+#ifndef TWEAKEY_H
+#define TWEAKEY_H
#include <stdio.h> /* debug */
#include <stdint.h>
@@ -29,3 +30,5 @@ void tweakey_state_extract(
);
void tweakey_state_update(tweakey_state *TK);
+
+#endif /* TWEAKEY_H */