diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-24 17:59:40 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-24 17:59:40 +0100 |
commit | f1f8be8205f221ea213d4c304ffc7e6bd2c47aa2 (patch) | |
tree | 8d9cf7fad808f0232660eaa8f1a797aaa1937771 /src/libutil/util.h | |
parent | 2845e192b02897996de2c1a0e65e11f7f268072a (diff) | |
download | rspamd-f1f8be8205f221ea213d4c304ffc7e6bd2c47aa2.tar.gz rspamd-f1f8be8205f221ea213d4c304ffc7e6bd2c47aa2.zip |
Move constant_memcmp to libutil code.
Diffstat (limited to 'src/libutil/util.h')
-rw-r--r-- | src/libutil/util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h index b0a165004..df1c30e7d 100644 --- a/src/libutil/util.h +++ b/src/libutil/util.h @@ -402,6 +402,11 @@ guint64 rspamd_hash_seed (void); */ gdouble rspamd_time_jitter (gdouble in, gdouble jitter); +/** + * Constant time version of memcmp + */ +gboolean rspamd_constant_memcmp (const guchar *a, const guchar *b, gsize len); + /* Special case for ancient libevent */ #if !defined(LIBEVENT_VERSION_NUMBER) || LIBEVENT_VERSION_NUMBER < 0x02000000UL struct event_base * event_get_base (struct event *ev); |