From ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 14 Feb 2022 21:25:06 +0100 Subject: Refine libar2_hash_buf_size + add test + securely erase parts of the hash output buffer that is written to but is not part of the hash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- common.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common.h') diff --git a/common.h b/common.h index d918563..e02d2c6 100644 --- a/common.h +++ b/common.h @@ -28,6 +28,11 @@ #endif +#if defined(__GNUC__) +# define LIBAR2_WEAKLY_LINKED__ __attribute__((weak)) +#endif + + #ifndef CACHE_LINE_SIZE # define CACHE_LINE_SIZE 256 /* better with larger than actual than smaller than actual */ #endif @@ -48,6 +53,7 @@ # endif #endif + #define ELEMSOF(ARR) (sizeof(ARR) / sizeof(*(ARR))) #define MAX(A, B) ((A) > (B) ? (A) : (B)) -- cgit v1.2.3-70-g09d2