summaryrefslogtreecommitdiffhomepage
path: root/dbutil.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-10-03 22:25:30 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-10-03 22:25:30 +0800
commitd1dec41f7656d7937f1cce64df1cc41121f3e44d (patch)
treef188573e32fd2926e03f84bfa7ff4b26613377a6 /dbutil.h
parent69a165db86bc61c02a6d400ca2de77d6f480f46d (diff)
Constant time memcmp for the hmac and password crypt
Diffstat (limited to 'dbutil.h')
-rw-r--r--dbutil.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/dbutil.h b/dbutil.h
index 3af79f7..a34ddd7 100644
--- a/dbutil.h
+++ b/dbutil.h
@@ -94,4 +94,7 @@ int m_str_to_uint(const char* str, unsigned int *val);
/* Dropbear assertion */
#define dropbear_assert(X) do { if (!(X)) { fail_assert(#X, __FILE__, __LINE__); } } while (0)
+/* Returns 0 if a and b have the same contents */
+int constant_time_memcmp(const void* a, const void *b, size_t n);
+
#endif /* _DBUTIL_H_ */