Mercurial > dropbear
comparison dbutil.h @ 817:a625f9e135a4
Constant time memcmp for the hmac and password crypt
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 03 Oct 2013 22:25:30 +0800 |
parents | 504f33c684b5 |
children | 4095b6d7c9fc |
comparison
equal
deleted
inserted
replaced
816:84e4259dae3e | 817:a625f9e135a4 |
---|---|
92 #define DEF_MP_INT(X) mp_int X = {0, 0, 0, NULL} | 92 #define DEF_MP_INT(X) mp_int X = {0, 0, 0, NULL} |
93 | 93 |
94 /* Dropbear assertion */ | 94 /* Dropbear assertion */ |
95 #define dropbear_assert(X) do { if (!(X)) { fail_assert(#X, __FILE__, __LINE__); } } while (0) | 95 #define dropbear_assert(X) do { if (!(X)) { fail_assert(#X, __FILE__, __LINE__); } } while (0) |
96 | 96 |
97 /* Returns 0 if a and b have the same contents */ | |
98 int constant_time_memcmp(const void* a, const void *b, size_t n); | |
99 | |
97 #endif /* _DBUTIL_H_ */ | 100 #endif /* _DBUTIL_H_ */ |