diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-11-12 14:32:28 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-11-12 14:32:28 +0100 |
commit | d6f6a9031c9cb4ab0d67a21c23cc3f934ecc0065 (patch) | |
tree | 7d9a5c483664e57936a9da72afefc7379b1cc9dd /src/libkeccak/state.h | |
parent | add another test (diff) | |
download | libkeccak-d6f6a9031c9cb4ab0d67a21c23cc3f934ecc0065.tar.gz libkeccak-d6f6a9031c9cb4ab0d67a21c23cc3f934ecc0065.tar.bz2 libkeccak-d6f6a9031c9cb4ab0d67a21c23cc3f934ecc0065.tar.xz |
add secure variants of update and digest
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/libkeccak/state.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/libkeccak/state.h b/src/libkeccak/state.h index 8acb56b..74db7f9 100644 --- a/src/libkeccak/state.h +++ b/src/libkeccak/state.h @@ -141,12 +141,27 @@ void libkeccak_state_fast_destroy(libkeccak_state_t* restrict state) /** - * Wipe sensitive data wihout freeing any data, this is intended - * be called from `libkeccak_state_destroy` + * Wipe data in the state's message wihout freeing any data * * @param state The state that should be wipe */ __attribute__((leaf, nonnull, nothrow, optimize("-O0"))) +void libkeccak_state_wipe_message(volatile libkeccak_state_t* restrict state); + +/** + * Wipe data in the state's sponge wihout freeing any data + * + * @param state The state that should be wipe + */ +__attribute__((leaf, nonnull, nothrow, optimize("-O0"))) +void libkeccak_state_wipe_sponge(volatile libkeccak_state_t* restrict state); + +/** + * Wipe sensitive data wihout freeing any data + * + * @param state The state that should be wipe + */ +__attribute__((nonnull, nothrow, optimize("-O0"))) void libkeccak_state_wipe(volatile libkeccak_state_t* restrict state); |