summaryrefslogtreecommitdiff
path: root/rw.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-12-03 17:07:43 -0500
committerJeffrey Walton <noloader@gmail.com>2016-12-03 17:07:43 -0500
commit1b16a75352ea1c599ed198c31e57cb6708e0b1bc (patch)
tree5397de30d220ceb6d6c036c26c965e04037ccec8 /rw.h
parent7cc8ad1a1d6b9fdfea6ac3695ac50f45150ce05e (diff)
downloadcryptopp-git-1b16a75352ea1c599ed198c31e57cb6708e0b1bc.tar.gz
Updated documentation (Issue 328)
Diffstat (limited to 'rw.h')
-rw-r--r--rw.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/rw.h b/rw.h
index 9a890297..acfad02c 100644
--- a/rw.h
+++ b/rw.h
@@ -25,6 +25,9 @@ class CRYPTOPP_DLL RWFunction : public TrapdoorFunction, public PublicKey
typedef RWFunction ThisClass;
public:
+
+ //! \brief Initialize a Rabin-Williams public key
+ //! \param n the modulus
void Initialize(const Integer &n)
{m_n = n;}
@@ -59,14 +62,21 @@ class CRYPTOPP_DLL InvertibleRWFunction : public RWFunction, public TrapdoorFunc
typedef InvertibleRWFunction ThisClass;
public:
+ //! \brief Construct an InvertibleRWFunction
InvertibleRWFunction() : m_precompute(false) {}
+ //! \brief Initialize a Rabin-Williams private key
+ //! \param n modulus
+ //! \param p first prime factor
+ //! \param q second prime factor
+ //! \param u q<sup>-1</sup> mod p
+ //! \details This Initialize() function overload initializes a private key from existing parameters.
void Initialize(const Integer &n, const Integer &p, const Integer &q, const Integer &u);
//! \brief Create a Rabin-Williams private key
//! \param rng a RandomNumberGenerator derived class
//! \param modulusBits the size of the modulus, in bits
- //! \details This function overload of Initialize() creates a new keypair because it
+ //! \details This function overload of Initialize() creates a new private key because it
//! takes a RandomNumberGenerator() as a parameter. If you have an existing keypair,
//! then use one of the other Initialize() overloads.
void Initialize(RandomNumberGenerator &rng, unsigned int modulusBits)