diff options
author | Jeffrey Walton <noloader@gmail.com> | 2017-08-02 19:43:56 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2017-08-02 19:43:56 -0400 |
commit | 76ff3fc03b64fc2f491fae2e918733c1a153d444 (patch) | |
tree | 2aec1d661d783154be4c2ca63ae3b3fa809de652 /randpool.h | |
parent | 4da4ece5a573196edcc76785e3a2fa0ed8d4b47e (diff) | |
download | cryptopp-git-76ff3fc03b64fc2f491fae2e918733c1a153d444.tar.gz |
Remove pre-Crypto++ 5.5 interface
Users of OldRandomPool must use the new interface. All that means is they must call IncorporateEntropy instead of Put, and GenerateBlock instead of Get
Diffstat (limited to 'randpool.h')
-rw-r--r-- | randpool.h | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -72,8 +72,7 @@ private: //! HKDF.
//! \sa RandomPool, AutoSeededRandomPool, HKDF, P1363_KDF2, PKCS12_PBKDF, PKCS5_PBKDF2_HMAC
//! \since Crypto++ 6.0 (PGP 2.6.x style)
-class CRYPTOPP_DLL OldRandomPool : public RandomNumberGenerator,
- public Bufferless<BufferedTransformation>
+class CRYPTOPP_DLL OldRandomPool : public RandomNumberGenerator
{
public:
//! \brief Construct an OldRandomPool
@@ -84,26 +83,11 @@ public: // RandomNumberGenerator interface (Crypto++ 5.5 and above)
bool CanIncorporateEntropy() const {return true;}
void IncorporateEntropy(const byte *input, size_t length);
-
- // BufferedTransformation interface (Crypto++ 5.4 and below)
- size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking);
-
- bool AnyRetrievable() const {return true;}
- lword MaxRetrievable() const {return ULONG_MAX;}
-
- size_t TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true);
- size_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const
- {
- CRYPTOPP_UNUSED(target); CRYPTOPP_UNUSED(begin); CRYPTOPP_UNUSED(end);
- CRYPTOPP_UNUSED(channel); CRYPTOPP_UNUSED(blocking);
- throw NotImplemented("OldRandomPool: CopyRangeTo2() is not supported by this store");
- }
+ void GenerateIntoBufferedTransformation(BufferedTransformation &target, const std::string &channel, lword size);
byte GenerateByte();
void GenerateBlock(byte *output, size_t size);
- void IsolatedInitialize(const NameValuePairs ¶meters) {CRYPTOPP_UNUSED(parameters);}
-
protected:
void Stir();
|