From e893a752d7bf74c9692cad5f058a190a6a047210 Mon Sep 17 00:00:00 2001 From: weidai Date: Fri, 4 May 2007 15:38:32 +0000 Subject: add IncorporateEntropy and GenerateIntoBufferedTransformation to RNG interface git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@342 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- validat2.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'validat2.cpp') diff --git a/validat2.cpp b/validat2.cpp index 4154f5e..5ec0a2c 100644 --- a/validat2.cpp +++ b/validat2.cpp @@ -2,7 +2,7 @@ #include "pch.h" -#define CRYPTOPP_ENABLE_NAMESPACE_WEAK +#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1 #include "blumshub.h" #include "rsa.h" #include "md2.h" @@ -39,11 +39,9 @@ class FixedRNG : public RandomNumberGenerator public: FixedRNG(BufferedTransformation &source) : m_source(source) {} - byte GenerateByte() + void GenerateBlock(byte *output, size_t size) { - byte b; - m_source.Get(b); - return b; + m_source.Get(output, size); } private: -- cgit v1.2.1