aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common.h')
-rw-r--r--common.h19
1 files changed, 19 insertions, 0 deletions
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);
+}