diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-07-31 01:56:19 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-07-31 01:56:19 +0000 |
commit | 5b11a240c1f5a607b031cc7a2feb4a6af34c8282 (patch) | |
tree | 13eeef451673fecdcd5b5de0385a655d60e59e93 /cryptlib.cpp | |
parent | e84412066595cc6bec6565fbbf1a5ea6936c11d3 (diff) | |
download | cryptopp-5b11a240c1f5a607b031cc7a2feb4a6af34c8282.tar.gz |
workaround alpha build problem
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@122 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'cryptlib.cpp')
-rw-r--r-- | cryptlib.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cryptlib.cpp b/cryptlib.cpp index a4f972e..8cf68fb 100644 --- a/cryptlib.cpp +++ b/cryptlib.cpp @@ -145,16 +145,16 @@ void RandomNumberGenerator::DiscardBytes(unsigned int n) GenerateByte(); } -RandomNumberGenerator & NullRNG() +class ClassNullRNG : public RandomNumberGenerator { - class NullRNG : public RandomNumberGenerator - { - public: - std::string AlgorithmName() const {return "NullRNG";} - byte GenerateByte() {throw NotImplemented("NullRNG: NullRNG should only be passed to functions that don't need to generate random bytes");} - }; +public: + std::string AlgorithmName() const {return "NullRNG";} + byte GenerateByte() {throw NotImplemented("NullRNG: NullRNG should only be passed to functions that don't need to generate random bytes");} +}; - static NullRNG s_nullRNG; +RandomNumberGenerator & NullRNG() +{ + static ClassNullRNG s_nullRNG; return s_nullRNG; } |