diff options
author | Mattias Andrée <maandree@kth.se> | 2022-02-17 17:19:28 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-02-17 17:19:28 +0100 |
commit | f677983078a0e5afc0dda3c3273f86ea304ddba4 (patch) | |
tree | 71226709b35b890430c83a4737ef17a5882fa8a8 | |
parent | libar2_erase.3: mention weak linking (diff) | |
download | libar2-f677983078a0e5afc0dda3c3273f86ea304ddba4.tar.gz libar2-f677983078a0e5afc0dda3c3273f86ea304ddba4.tar.bz2 libar2-f677983078a0e5afc0dda3c3273f86ea304ddba4.tar.xz |
Remove obsolete macro
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | common.h | 5 | ||||
-rw-r--r-- | libar2_hash.c | 8 |
2 files changed, 6 insertions, 7 deletions
@@ -108,9 +108,8 @@ #define MIN(A, B) ((A) < (B) ? (A) : (B)) -#define ERASE(PTR, N) libar2_erase(PTR, N) -#define ERASE_ARRAY(ARR) ERASE(ARR, sizeof(ARR)) -#define ERASE_STRUCT(S) ERASE(&(S), sizeof(S)) +#define ERASE_ARRAY(ARR) libar2_erase(ARR, sizeof(ARR)) +#define ERASE_STRUCT(S) libar2_erase(&(S), sizeof(S)) struct block { diff --git a/libar2_hash.c b/libar2_hash.c index 4dc2e82..435d48d 100644 --- a/libar2_hash.c +++ b/libar2_hash.c @@ -497,7 +497,7 @@ initial_hash(unsigned char hash[static 64], void *msg, size_t msglen, } } if (ctx->autoerase_message) - ERASE(msg, msglen); + libar2_erase(msg, msglen); } n += store32(&block[n], (uint_least32_t)params->saltlen); @@ -520,7 +520,7 @@ initial_hash(unsigned char hash[static 64], void *msg, size_t msglen, n = params->saltlen - off; } if (ctx->autoerase_salt) - ERASE(params->salt, params->saltlen); + libar2_erase(params->salt, params->saltlen); } n += store32(&block[n], (uint_least32_t)params->keylen); @@ -543,7 +543,7 @@ initial_hash(unsigned char hash[static 64], void *msg, size_t msglen, n = params->keylen - off; } if (ctx->autoerase_secret) - ERASE(params->key, params->keylen); + libar2_erase(params->key, params->keylen); } n += store32(&block[n], (uint_least32_t)params->adlen); @@ -573,7 +573,7 @@ initial_hash(unsigned char hash[static 64], void *msg, size_t msglen, } } if (ctx->autoerase_associated_data) - ERASE(params->ad, params->adlen); + libar2_erase(params->ad, params->adlen); } libblake_blake2b_digest(&state, block, n, 0, 64, hash); |