summaryrefslogtreecommitdiff
path: root/rdrand.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-11-29 10:54:33 -0500
committerJeffrey Walton <noloader@gmail.com>2017-11-29 10:54:33 -0500
commit61ec50dabe14c5d4582ac187706ea27645b3562b (patch)
tree18a2eebb7adc8c9556ce132d7081a105fa058d6b /rdrand.h
parent16ebfa72bf130c4725e652e4d3688d97d3feb0ee (diff)
downloadcryptopp-git-61ec50dabe14c5d4582ac187706ea27645b3562b.tar.gz
Change Doxygen comment style from //! to ///
Also see https://groups.google.com/forum/#!topic/cryptopp-users/A7-Xt5Knlzw
Diffstat (limited to 'rdrand.h')
-rw-r--r--rdrand.h98
1 files changed, 49 insertions, 49 deletions
diff --git a/rdrand.h b/rdrand.h
index 33309017..320d864c 100644
--- a/rdrand.h
+++ b/rdrand.h
@@ -1,8 +1,8 @@
// rdrand.h - written and placed in public domain by Jeffrey Walton and Uri Blumenthal.
-//! \file rdrand.h
-//! \brief Classes for RDRAND and RDSEED
-//! \since Crypto++ 5.6.3
+/// \file rdrand.h
+/// \brief Classes for RDRAND and RDSEED
+/// \since Crypto++ 5.6.3
#ifndef CRYPTOPP_RDRAND_H
#define CRYPTOPP_RDRAND_H
@@ -32,9 +32,9 @@
NAMESPACE_BEGIN(CryptoPP)
-//! \brief Exception thrown when a RDRAND generator encounters
-//! a generator related error.
-//! \since Crypto++ 5.6.3
+/// \brief Exception thrown when a RDRAND generator encounters
+/// a generator related error.
+/// \since Crypto++ 5.6.3
class RDRAND_Err : public Exception
{
public:
@@ -42,9 +42,9 @@ public:
: Exception(OTHER_ERROR, "RDRAND: " + operation + " operation failed") {}
};
-//! \brief Hardware generated random numbers using RDRAND instruction
-//! \sa MaurerRandomnessTest() for random bit generators
-//! \since Crypto++ 5.6.3
+/// \brief Hardware generated random numbers using RDRAND instruction
+/// \sa MaurerRandomnessTest() for random bit generators
+/// \since Crypto++ 5.6.3
class RDRAND : public RandomNumberGenerator
{
public:
@@ -52,29 +52,29 @@ public:
virtual ~RDRAND() {}
- //! \brief Construct a RDRAND generator
- //! \details According to DJ of Intel, the Intel RDRAND circuit does not underflow.
- //! If it did hypothetically underflow, then it would return 0 for the random value.
- //! AMD's RDRAND implementation appears to provide the same behavior.
- //! \throws RDRAND_Err if the random number generator is not available
+ /// \brief Construct a RDRAND generator
+ /// \details According to DJ of Intel, the Intel RDRAND circuit does not underflow.
+ /// If it did hypothetically underflow, then it would return 0 for the random value.
+ /// AMD's RDRAND implementation appears to provide the same behavior.
+ /// \throws RDRAND_Err if the random number generator is not available
RDRAND();
- //! \brief Generate random array of bytes
- //! \param output the byte buffer
- //! \param size the length of the buffer, in bytes
+ /// \brief Generate random array of bytes
+ /// \param output the byte buffer
+ /// \param size the length of the buffer, in bytes
virtual void GenerateBlock(byte *output, size_t size);
- //! \brief Generate and discard n bytes
- //! \param n the number of bytes to generate and discard
- //! \details the RDSEED generator discards words, not bytes. If n is
- //! not a multiple of a machine word, then it is rounded up to
- //! that size.
+ /// \brief Generate and discard n bytes
+ /// \param n the number of bytes to generate and discard
+ /// \details the RDSEED generator discards words, not bytes. If n is
+ /// not a multiple of a machine word, then it is rounded up to
+ /// that size.
virtual void DiscardBytes(size_t n);
- //! \brief Update RNG state with additional unpredictable values
- //! \param input unused
- //! \param length unused
- //! \details The operation is a nop for this generator.
+ /// \brief Update RNG state with additional unpredictable values
+ /// \param input unused
+ /// \param length unused
+ /// \details The operation is a nop for this generator.
virtual void IncorporateEntropy(const byte *input, size_t length)
{
// Override to avoid the base class' throw.
@@ -82,9 +82,9 @@ public:
}
};
-//! \brief Exception thrown when a RDSEED generator encounters
-//! a generator related error.
-//! \since Crypto++ 5.6.3
+/// \brief Exception thrown when a RDSEED generator encounters
+/// a generator related error.
+/// \since Crypto++ 5.6.3
class RDSEED_Err : public Exception
{
public:
@@ -92,9 +92,9 @@ public:
: Exception(OTHER_ERROR, "RDSEED: " + operation + " operation failed") {}
};
-//! \brief Hardware generated random numbers using RDSEED instruction
-//! \sa MaurerRandomnessTest() for random bit generators
-//! \since Crypto++ 5.6.3
+/// \brief Hardware generated random numbers using RDSEED instruction
+/// \sa MaurerRandomnessTest() for random bit generators
+/// \since Crypto++ 5.6.3
class RDSEED : public RandomNumberGenerator
{
public:
@@ -102,29 +102,29 @@ public:
virtual ~RDSEED() {}
- //! \brief Construct a RDSEED generator
- //! \details Empirical testing under a 6th generaton i7 (6200U) shows RDSEED fails
- //! to fulfill requests at about once every for every 256 bytes requested.
- //! The generator runs about 4 times slower than RDRAND.
- //! \throws RDSEED_Err if the random number generator is not available
+ /// \brief Construct a RDSEED generator
+ /// \details Empirical testing under a 6th generaton i7 (6200U) shows RDSEED fails
+ /// to fulfill requests at about once every for every 256 bytes requested.
+ /// The generator runs about 4 times slower than RDRAND.
+ /// \throws RDSEED_Err if the random number generator is not available
RDSEED();
- //! \brief Generate random array of bytes
- //! \param output the byte buffer
- //! \param size the length of the buffer, in bytes
+ /// \brief Generate random array of bytes
+ /// \param output the byte buffer
+ /// \param size the length of the buffer, in bytes
virtual void GenerateBlock(byte *output, size_t size);
- //! \brief Generate and discard n bytes
- //! \param n the number of bytes to generate and discard
- //! \details the RDSEED generator discards words, not bytes. If n is
- //! not a multiple of a machine word, then it is rounded up to
- //! that size.
+ /// \brief Generate and discard n bytes
+ /// \param n the number of bytes to generate and discard
+ /// \details the RDSEED generator discards words, not bytes. If n is
+ /// not a multiple of a machine word, then it is rounded up to
+ /// that size.
virtual void DiscardBytes(size_t n);
- //! \brief Update RNG state with additional unpredictable values
- //! \param input unused
- //! \param length unused
- //! \details The operation is a nop for this generator.
+ /// \brief Update RNG state with additional unpredictable values
+ /// \param input unused
+ /// \param length unused
+ /// \details The operation is a nop for this generator.
virtual void IncorporateEntropy(const byte *input, size_t length)
{
// Override to avoid the base class' throw.