From 8d46de55be9fce55b297915e7086f77ceaab6f19 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Wed, 21 Nov 2018 16:34:25 +0100 Subject: Ajout de traces pour cipher.c (début) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implémentation de test-cipher.c en passant. --- crypto_aead/lilliputaei128v1/ref/debug.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'crypto_aead/lilliputaei128v1/ref/debug.h') diff --git a/crypto_aead/lilliputaei128v1/ref/debug.h b/crypto_aead/lilliputaei128v1/ref/debug.h index e107019..934a287 100644 --- a/crypto_aead/lilliputaei128v1/ref/debug.h +++ b/crypto_aead/lilliputaei128v1/ref/debug.h @@ -26,3 +26,22 @@ static inline void debug_dump_lanes(FILE *output, const char *header, size_t len } fprintf(output, "\n"); } + +static inline void debug_dump_buffer(FILE *output, const char *header, size_t len, const uint8_t buf[len], int indent) +{ + if (!output) + { + return; + } + + fprintf(output, "%s\n", header); + + fprintf(output, "%*s", indent, ""); + for (size_t b=0; b