diff options
| author | Jeffrey Walton <noloader@gmail.com> | 2017-08-02 18:55:10 -0400 |
|---|---|---|
| committer | Jeffrey Walton <noloader@gmail.com> | 2017-08-02 18:55:10 -0400 |
| commit | 4da4ece5a573196edcc76785e3a2fa0ed8d4b47e (patch) | |
| tree | 39194082f982443413144e4d962f5693417e1016 /randpool.cpp | |
| parent | 2578bccf083bcc6fb8cff98d8f51103328d4a02e (diff) | |
| download | cryptopp-git-4da4ece5a573196edcc76785e3a2fa0ed8d4b47e.tar.gz | |
Cut-in RandomNumberGenerator interface to OldRandPool
The existing interface still exists. The new interface is routed into the old methods. Without the new interface, using OldRandPool could result in:
$ ./cryptest.exe v
terminate called after throwing an instance of CryptoPP::NotImplemented
what(): RandomNumberGenerator: IncorporateEntropy not implemented
Aborted (core dumped)
Diffstat (limited to 'randpool.cpp')
| -rw-r--r-- | randpool.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/randpool.cpp b/randpool.cpp index 39afd72f..1813da54 100644 --- a/randpool.cpp +++ b/randpool.cpp @@ -86,6 +86,11 @@ OldRandomPool::OldRandomPool(unsigned int poolSize) ::memset(key, 0, key.size());
}
+void OldRandomPool::IncorporateEntropy(const byte *input, size_t length)
+{
+ OldRandomPool::Put(input, length);
+}
+
void OldRandomPool::Stir()
{
CFB_Mode<OldRandomPoolCipher>::Encryption cipher;
|
