aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-01-31 12:47:15 +0000
committerlloyd <[email protected]>2009-01-31 12:47:15 +0000
commit0698d2ce28b4150173dc4f0f6577489124e16290 (patch)
tree191720436d72256c529322e865319e119fe0dea3
parentc9c5f9ae8c136b8a6a94c41ccc7d5b55509125a4 (diff)
Recast to byte pointer in Entropy_Accumulator before passing to add_bytes
-rw-r--r--src/entropy/entropy_src.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/entropy/entropy_src.h b/src/entropy/entropy_src.h
index 3fd5c443e..eb3a841b4 100644
--- a/src/entropy/entropy_src.h
+++ b/src/entropy/entropy_src.h
@@ -44,7 +44,7 @@ class Entropy_Accumulator
void add(const void* bytes, u32bit length, double entropy_bits_per_byte)
{
- add_bytes(bytes, length);
+ add_bytes(reinterpret_cast<const byte*>(bytes), length);
collected_bits += entropy_bits_per_byte * length;
}
@@ -54,7 +54,7 @@ class Entropy_Accumulator
add(&v, sizeof(T), entropy_bits_per_byte);
}
private:
- virtual void add_bytes(const void* bytes, u32bit length) = 0;
+ virtual void add_bytes(const byte bytes[], u32bit length) = 0;
SecureVector<byte> io_buffer;
u32bit entropy_goal;
@@ -69,9 +69,9 @@ class Entropy_Accumulator_BufferedComputation : public Entropy_Accumulator
Entropy_Accumulator(goal), entropy_sink(sink) {}
private:
- virtual void add_bytes(const void* bytes, u32bit length)
+ virtual void add_bytes(const byte bytes[], u32bit length)
{
- entropy_sink.update(reinterpret_cast<const byte*>(bytes), length);
+ entropy_sink.update(bytes, length);
}
BufferedComputation& entropy_sink;