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

« back to all changes in this revision

Viewing changes to include/x931_rng.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
 
* ANSI X9.31 RNG Header File                     *
3
 
* (C) 1999-2007 The Botan Project                *
4
 
*************************************************/
5
 
 
6
 
#ifndef BOTAN_ANSI_X931_RNG_H__
7
 
#define BOTAN_ANSI_X931_RNG_H__
8
 
 
9
 
#include <botan/base.h>
10
 
 
11
 
namespace Botan {
12
 
 
13
 
/*************************************************
14
 
* ANSI X9.31 RNG                                 *
15
 
*************************************************/
16
 
class ANSI_X931_RNG : public RandomNumberGenerator
17
 
   {
18
 
   public:
19
 
      void randomize(byte[], u32bit) throw(PRNG_Unseeded);
20
 
      bool is_seeded() const;
21
 
      void clear() throw();
22
 
      std::string name() const;
23
 
 
24
 
      ANSI_X931_RNG(const std::string& = "", RandomNumberGenerator* = 0);
25
 
      ~ANSI_X931_RNG();
26
 
   private:
27
 
      void add_randomness(const byte[], u32bit);
28
 
      void update_buffer();
29
 
 
30
 
      BlockCipher* cipher;
31
 
      RandomNumberGenerator* prng;
32
 
      SecureVector<byte> V, R;
33
 
      u32bit position;
34
 
   };
35
 
 
36
 
}
37
 
 
38
 
#endif