diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-14 21:25:06 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-14 21:25:06 +0100 |
commit | ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b (patch) | |
tree | 416ad9e2f06aef594714b06a91f7f379d1766749 /common.h | |
parent | Fix previous commit (diff) | |
download | libar2-ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b.tar.gz libar2-ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b.tar.bz2 libar2-ea7d8f4a919bf6c9e68ea4a55ef763c310ecfc9b.tar.xz |
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
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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)) |