The unified diff between revisions [92f17752..] and [4e40e885..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'src/buf_es.cpp'

#
#
# patch "src/buf_es.cpp"
#  from [2e725066213e388d4a875613b774203e8fda58d0]
#    to [aa507bb49b93b77a65b3cba83c3aeee1edf99026]
#
============================================================
--- src/buf_es.cpp	2e725066213e388d4a875613b774203e8fda58d0
+++ src/buf_es.cpp	aa507bb49b93b77a65b3cba83c3aeee1edf99026
@@ -1,6 +1,6 @@
 /*************************************************
 * Buffered EntropySource Source File             *
-* (C) 1999-2006 The Botan Project                *
+* (C) 1999-2007 Jack Lloyd                       *
 *************************************************/

 #include <botan/buf_es.h>
@@ -36,6 +36,7 @@ u32bit Buffered_EntropySource::slow_poll
 u32bit Buffered_EntropySource::slow_poll(byte out[], u32bit length)
    {
    do_slow_poll();
+   done_slow_poll = true;
    return copy_out(out, length, buffer.size());
    }

@@ -52,7 +53,8 @@ void Buffered_EntropySource::add_bytes(c
 *************************************************/
 void Buffered_EntropySource::add_bytes(const void* entropy_ptr, u32bit length)
    {
-   const byte* bytes = (const byte*)entropy_ptr;
+   const byte* bytes = static_cast<const byte*>(entropy_ptr);
+
    while(length)
       {
       u32bit copied = std::min(length, buffer.size() - write_pos);
@@ -68,18 +70,10 @@ void Buffered_EntropySource::add_bytes(u
 *************************************************/
 void Buffered_EntropySource::add_bytes(u64bit entropy)
    {
-   add_bytes((const void*)&entropy, 8);
+   add_bytes(&entropy, 8);
    }

 /*************************************************
-* Add entropy to the internal buffer             *
-*************************************************/
-void Buffered_EntropySource::add_timestamp()
-   {
-   add_bytes(system_clock());
-   }
-
-/*************************************************
 * Take entropy from the internal buffer          *
 *************************************************/
 u32bit Buffered_EntropySource::copy_out(byte out[], u32bit length,