diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-01-18 14:00:44 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-01-18 14:00:44 +0000 |
commit | 1fee9a39017d946152eab4f29e0d143db13ae951 (patch) | |
tree | d57687863ff00a6ef149843d7023850d8613fe61 /src/libutil | |
parent | 5570daed2d0faafbde564cae36a0b4764e266c4a (diff) | |
download | rspamd-1fee9a39017d946152eab4f29e0d143db13ae951.tar.gz rspamd-1fee9a39017d946152eab4f29e0d143db13ae951.zip |
[Fix] Make words selection random deterministic upon content
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/util.c | 4 | ||||
-rw-r--r-- | src/libutil/util.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c index 31bb86200..04200e36d 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -1,5 +1,5 @@ /* - * Copyright 2023 Vsevolod Stakhov + * Copyright 2024 Vsevolod Stakhov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1754,7 +1754,7 @@ rspamd_fast_random_seed(void) } /* wyrand */ -static inline uint64_t +inline uint64_t rspamd_random_uint64_fast_seed(uint64_t *seed) { *seed += UINT64_C(0xa0761d6478bd642f); diff --git a/src/libutil/util.h b/src/libutil/util.h index aecd1b048..7111a079e 100644 --- a/src/libutil/util.h +++ b/src/libutil/util.h @@ -1,5 +1,5 @@ /* - * Copyright 2023 Vsevolod Stakhov + * Copyright 2024 Vsevolod Stakhov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -403,6 +403,7 @@ gdouble rspamd_random_double(void); */ gdouble rspamd_random_double_fast(void); gdouble rspamd_random_double_fast_seed(guint64 *seed); +uint64_t rspamd_random_uint64_fast_seed(uint64_t *seed); guint64 rspamd_random_uint64_fast(void); /** |