From 4bee0519f5dabe36427a35fc764496e766b38137 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Tue, 11 Oct 2016 19:51:15 -0400 Subject: [PATCH] Updated documentation --- cryptlib.h | 22 +++++++++++++++------- seckey.h | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/cryptlib.h b/cryptlib.h index 8ccd0f76..9ac0e8a8 100644 --- a/cryptlib.h +++ b/cryptlib.h @@ -531,19 +531,27 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE SimpleKeyingInterface public: virtual ~SimpleKeyingInterface() {} - //! \brief Returns smallest valid key length in bytes + //! \brief Returns smallest valid key length + //! \returns the minimum key length, in bytes virtual size_t MinKeyLength() const =0; - //! \brief Returns largest valid key length in bytes + //! \brief Returns largest valid key length + //! \returns the maximum key length, in bytes virtual size_t MaxKeyLength() const =0; - //! \brief Returns default (recommended) key length in bytes + //! \brief Returns default key length + //! \returns the default (recommended) key length, in bytes virtual size_t DefaultKeyLength() const =0; - //! \brief - //! \param n the desired keylength - //! \return the smallest valid key length in bytes that is greater than or equal to min(n, GetMaxKeyLength()) + //! \brief Returns a valid key length for the algorithm + //! \param keylength the size of the key, in bytes + //! \returns the valid key length, in bytes + //! \details keylength is provided in bytes, not bits. If keylength is less than MIN_KEYLENGTH, + //! then the function returns MIN_KEYLENGTH. If keylength is greater than MAX_KEYLENGTH, + //! then the function returns MAX_KEYLENGTH. if If keylength is a multiple of KEYLENGTH_MULTIPLE, + //! then keylength is returned. Otherwise, the function returns a \a lower multiple of + //! KEYLENGTH_MULTIPLE. virtual size_t GetValidKeyLength(size_t n) const =0; - //! \brief Returns whether keylength is a valid key length + //! \brief Returns whether keylength is a valid key length //! \param keylength the requested keylength //! \return true if keylength is valid, false otherwise //! \details Internally the function calls GetValidKeyLength() diff --git a/seckey.h b/seckey.h index bbf1ea7a..468f8b55 100644 --- a/seckey.h +++ b/seckey.h @@ -295,7 +295,7 @@ public: //! \brief Provides a valid key length for the algorithm //! \param keylength the size of the key, in bytes - //! \returns the valid key lenght, in bytes + //! \returns the valid key length, in bytes //! \details keylength is provided in bytes, not bits. If keylength is less than MIN_KEYLENGTH, //! then the function returns MIN_KEYLENGTH. If keylength is greater than MAX_KEYLENGTH, //! then the function returns MAX_KEYLENGTH. if If keylength is a multiple of KEYLENGTH_MULTIPLE,