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 --- common.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'common.h') diff --git a/common.h b/common.h index 1245bf6..df8b53c 100644 --- a/common.h +++ b/common.h @@ -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); +} -- cgit v1.2.3-70-g09d2