diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-11-18 15:32:28 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-11-18 15:32:28 -0500 |
commit | 6ac1e46a1fb01f01705b67dd553d5ba317b1dc3e (patch) | |
tree | f0d873d0b377a91dce5ee384e60426ef57efc92b /blumshub.h | |
parent | d2fda9bd4231a7dfcb44e59150f11246d992843f (diff) | |
download | cryptopp-git-6ac1e46a1fb01f01705b67dd553d5ba317b1dc3e.tar.gz |
Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 (Coverity rollup)
Diffstat (limited to 'blumshub.h')
-rw-r--r-- | blumshub.h | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -1,3 +1,9 @@ +// blumshub.h - written and placed in the public domain by Wei Dai
+
+//! \file
+//! \headerfile blumshub.h
+//! \brief Classes for Blum Blum Shub generator
+
#ifndef CRYPTOPP_BLUMSHUB_H
#define CRYPTOPP_BLUMSHUB_H
@@ -21,14 +27,15 @@ public: bool IsSelfInverting() const {return true;}
bool IsForwardTransformation() const {return true;}
+
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~PublicBlumBlumShub() {}
+#endif
protected:
ModularArithmetic modn;
- word maxBits, bitsLeft;
Integer current;
-
- friend class BlumGoldwasserPublicKey;
- friend class BlumGoldwasserPrivateKey;
+ word maxBits, bitsLeft;
};
//! BlumBlumShub with factorization of the modulus
@@ -42,6 +49,10 @@ public: bool IsRandomAccess() const {return true;}
void Seek(lword index);
+#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
+ virtual ~BlumBlumShub() {}
+#endif
+
protected:
const Integer p, q;
const Integer x0;
|