diff options
author | Mattias Andrée <maandree@kth.se> | 2019-02-11 16:22:00 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2019-02-11 16:22:00 +0100 |
commit | 5ff4c5af715d098852d124de116d354ee10f4ea4 (patch) | |
tree | 5789ad5798f2dbf21d9406a2942e48b222f773ae /common.h | |
parent | Remove old file (diff) | |
download | libkeccak-5ff4c5af715d098852d124de116d354ee10f4ea4.tar.gz libkeccak-5ff4c5af715d098852d124de116d354ee10f4ea4.tar.bz2 libkeccak-5ff4c5af715d098852d124de116d354ee10f4ea4.tar.xz |
Split most .c files into one per function and flatten file hierarchy
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -15,3 +15,22 @@ # define __builtin_memcpy(dest, src, n) memcpy(dest, src, n) # define __builtin_memmove(dest, src, n) memmove(dest, src, n) #endif + + +/** + * The outer pad pattern for HMAC + */ +#define HMAC_OUTER_PAD 0x5C + +/** + * The inner pad pattern for HMAC + */ +#define HMAC_INNER_PAD 0x36 + + +static void *(*volatile my_explicit_memset)(void *, int, size_t) = memset; +static __attribute__((__optimize__("-O0"))) void +my_explicit_bzero(void *ptr, size_t size) +{ + (*my_explicit_memset)(ptr, 0, size); +} |