~ubuntu-branches/debian/sid/botan/sid

« back to all changes in this revision

Viewing changes to include/buf_es.h

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2018-03-01 22:23:25 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20180301222325-7p7vc45gu3hta34d
Tags: 2.4.0-2
* Don't remove .doctrees from the manual if it doesn't exist.
* Don't specify parallel to debhelper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*************************************************
2
 
* Buffered EntropySource Header File             *
3
 
* (C) 1999-2007 The Botan Project                *
4
 
*************************************************/
5
 
 
6
 
#ifndef BOTAN_BUFFERED_ES_H__
7
 
#define BOTAN_BUFFERED_ES_H__
8
 
 
9
 
#include <botan/base.h>
10
 
 
11
 
namespace Botan {
12
 
 
13
 
/*************************************************
14
 
* Buffered EntropySource                         *
15
 
*************************************************/
16
 
class Buffered_EntropySource : public EntropySource
17
 
   {
18
 
   public:
19
 
      u32bit slow_poll(byte[], u32bit);
20
 
      u32bit fast_poll(byte[], u32bit);
21
 
   protected:
22
 
      Buffered_EntropySource();
23
 
      u32bit copy_out(byte[], u32bit, u32bit);
24
 
 
25
 
      void add_bytes(const void*, u32bit);
26
 
      void add_bytes(u64bit);
27
 
      void add_timestamp();
28
 
 
29
 
      virtual void do_slow_poll() = 0;
30
 
      virtual void do_fast_poll();
31
 
   private:
32
 
      SecureVector<byte> buffer;
33
 
      u32bit write_pos, read_pos;
34
 
      bool done_slow_poll;
35
 
   };
36
 
 
37
 
}
38
 
 
39
 
#endif