From 5ff4c5af715d098852d124de116d354ee10f4ea4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 11 Feb 2019 16:22:00 +0100 Subject: Split most .c files into one per function and flatten file hierarchy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libkeccak_state_wipe_message.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 libkeccak_state_wipe_message.c (limited to 'libkeccak_state_wipe_message.c') diff --git a/libkeccak_state_wipe_message.c b/libkeccak_state_wipe_message.c new file mode 100644 index 0000000..d6bc8a0 --- /dev/null +++ b/libkeccak_state_wipe_message.c @@ -0,0 +1,17 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + + +/** + * Wipe data in the state's message wihout freeing any data + * + * @param state The state that should be wipe + */ +void +libkeccak_state_wipe_message(volatile libkeccak_state_t *restrict state) +{ + volatile char *restrict M = state->M; + size_t i; + for (i = 0; i < state->mptr; i++) + M[i] = 0; +} -- cgit v1.2.3-70-g09d2