From 2efe26a418bc89e2cff09b113628cd26d3753e09 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 14 Jun 2016 20:50:39 -0400 Subject: [PATCH] Update comment. Whitespace cleanup --- rdrand.cpp | 10 +++++----- rdrand.h | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/rdrand.cpp b/rdrand.cpp index 3a988b4c..351d583e 100644 --- a/rdrand.cpp +++ b/rdrand.cpp @@ -137,7 +137,7 @@ # endif # if defined(__has_include) # if __has_include() -# include // rdseed for Clang (immintrin.h); rdseed for Clang (rdseedintrin.h) +# include // rdrand for Clang (immintrin.h); rdseed for Clang (rdseedintrin.h) # endif # endif #endif @@ -169,12 +169,12 @@ extern "C" int NASM_RRA_GenerateBlock(byte*, size_t, unsigned int); #if NASM_RDSEED_ASM_AVAILABLE extern "C" int NASM_RSA_GenerateBlock(byte*, size_t, unsigned int); #endif - + ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// NAMESPACE_BEGIN(CryptoPP) - + #if ALL_RDRAND_INTRIN_AVAILABLE static int ALL_RRI_GenerateBlock(byte *output, size_t size, unsigned int safety) { @@ -226,7 +226,7 @@ static int ALL_RRI_GenerateBlock(byte *output, size_t size, unsigned int safety) } } } - + #if CRYPTOPP_BOOL_X64 || CRYTPOPP_BOOL_X32 *((volatile word64*)&val) = 0; #else @@ -407,7 +407,7 @@ static int ALL_RSI_GenerateBlock(byte *output, size_t size, unsigned int safety) } } } - + #if CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_X32 *((volatile word64*)&val) = 0; #else diff --git a/rdrand.h b/rdrand.h index 2e613618..2729ed7f 100644 --- a/rdrand.h +++ b/rdrand.h @@ -37,7 +37,7 @@ class RDRAND : public RandomNumberGenerator { public: std::string AlgorithmName() const {return "RDRAND";} - + //! \brief Construct a RDRAND generator //! \param retries the number of retries for failed calls to the hardware //! \details RDRAND() constructs a generator with a maximum number of retires @@ -46,16 +46,16 @@ public: //! to fulfill requests at about 6 to 8 times the rate of RDRAND. The default //! retries reflects the difference. RDRAND(unsigned int retries = 12) : m_retries(retries) {} - + virtual ~RDRAND() {} - + //! \brief Retrieve the number of retries used by the generator //! \returns the number of times GenerateBlock() will attempt to recover from a failed generation unsigned int GetRetries() const { return m_retries; } - + //! \brief Set the number of retries used by the generator //! \param retries number of times GenerateBlock() will attempt to recover from a failed generation void SetRetries(unsigned int retries) @@ -119,7 +119,7 @@ class RDSEED : public RandomNumberGenerator { public: std::string AlgorithmName() const {return "RDSEED";} - + //! \brief Construct a RDSEED generator //! \param retries the number of retries for failed calls to the hardware //! \details RDSEED() constructs a generator with a maximum number of retires @@ -128,16 +128,16 @@ public: //! to fulfill requests at about 6 to 8 times the rate of RDRAND. The default //! retries reflects the difference. RDSEED(unsigned int retries = 64) : m_retries(retries) {} - + virtual ~RDSEED() {} - + //! \brief Retrieve the number of retries used by the generator //! \returns the number of times GenerateBlock() will attempt to recover from a failed generation unsigned int GetRetries() const { return m_retries; } - + //! \brief Set the number of retries used by the generator //! \param retries number of times GenerateBlock() will attempt to recover from a failed generation void SetRetries(unsigned int retries)