summaryrefslogtreecommitdiff
path: root/src/common/util.h
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2014-12-08 15:00:58 +0100
committerKarsten Loesing <karsten.loesing@gmx.net>2014-12-10 11:16:26 +0100
commit7cd53b75c10831e01e288b01f63cab069d3e3035 (patch)
tree66c1fbe2342f02f6948402931f77bc8f5880088a /src/common/util.h
parent447ece46f5705770df05bd28e27765dde50063de (diff)
downloadtor-7cd53b75c10831e01e288b01f63cab069d3e3035.tar.gz
tor-7cd53b75c10831e01e288b01f63cab069d3e3035.zip
Add better support to obfuscate statistics.
Diffstat (limited to 'src/common/util.h')
-rw-r--r--src/common/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/util.h b/src/common/util.h
index 921dd79da0..b8fd20fd7d 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -172,6 +172,10 @@ uint64_t round_to_power_of_2(uint64_t u64);
unsigned round_to_next_multiple_of(unsigned number, unsigned divisor);
uint32_t round_uint32_to_next_multiple_of(uint32_t number, uint32_t divisor);
uint64_t round_uint64_to_next_multiple_of(uint64_t number, uint64_t divisor);
+int64_t round_int64_to_next_multiple_of(int64_t number, int64_t divisor);
+double sample_laplace_distribution(double mu, double b, double p);
+int64_t add_laplace_noise(int64_t signal, double random, double delta_f,
+ double epsilon);
int n_bits_set_u8(uint8_t v);
/* Compute the CEIL of <b>a</b> divided by <b>b</b>, for nonnegative <b>a</b>