From 526742d862325178f79823fdfd9e11fcb7e7f77d Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 25 Jan 2018 16:27:44 -0500 Subject: [PATCH] Update documentation --- cryptlib.h | 6 +++++- kalyna.h | 11 ++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/cryptlib.h b/cryptlib.h index a43da4e2..cbff1fe2 100644 --- a/cryptlib.h +++ b/cryptlib.h @@ -850,9 +850,11 @@ public: /// \brief Provides input and output data alignment for optimal performance. /// \return the input data alignment that provides optimal performance + /// \sa GetAlignment() and OptimalBlockSize() virtual unsigned int OptimalDataAlignment() const; - /// returns true if this is a permutation (i.e. there is an inverse transformation) + /// \brief Determines if the transformation is a permutation + /// \returns true if this is a permutation (i.e. there is an inverse transformation) virtual bool IsPermutation() const {return true;} /// \brief Determines if the cipher is being operated in its forward direction @@ -931,6 +933,7 @@ public: /// \brief Provides input and output data alignment for optimal performance /// \return the input data alignment that provides optimal performance + /// \sa GetAlignment() and OptimalBlockSize() virtual unsigned int OptimalDataAlignment() const; /// \brief Encrypt or decrypt an array of bytes @@ -1124,6 +1127,7 @@ public: /// \brief Provides input and output data alignment for optimal performance /// \return the input data alignment that provides optimal performance + /// \sa GetAlignment() and OptimalBlockSize() virtual unsigned int OptimalDataAlignment() const; /// \brief Updates the hash with additional input and computes the hash of the current message diff --git a/kalyna.h b/kalyna.h index 43e54bd0..0202ce8f 100644 --- a/kalyna.h +++ b/kalyna.h @@ -92,6 +92,9 @@ public: return std::string("Kalyna-128") + "(" + IntToString(m_kl*8) + ")"; } + /// \brief Provides input and output data alignment for optimal performance. + /// \return the input data alignment that provides optimal performance + /// \sa GetAlignment() and OptimalBlockSize() unsigned int OptimalDataAlignment() const { return GetAlignmentOf(); } @@ -105,7 +108,7 @@ public: void SetKey_24(const word64 key[4]); void ProcessBlock_22(const word64 inBlock[2], const word64 xorBlock[2], word64 outBlock[2]) const; void ProcessBlock_24(const word64 inBlock[2], const word64 xorBlock[2] ,word64 outBlock[2]) const; - }; + }; typedef BlockCipherFinal Encryption; typedef BlockCipherFinal Decryption; @@ -135,6 +138,9 @@ public: return std::string("Kalyna-256") + "(" + IntToString(m_kl*8) + ")"; } + /// \brief Provides input and output data alignment for optimal performance. + /// \return the input data alignment that provides optimal performance + /// \sa GetAlignment() and OptimalBlockSize() unsigned int OptimalDataAlignment() const { return GetAlignmentOf(); } @@ -178,6 +184,9 @@ public: return std::string("Kalyna-512") + "(" + IntToString(m_kl*8) + ")"; } + /// \brief Provides input and output data alignment for optimal performance. + /// \return the input data alignment that provides optimal performance + /// \sa GetAlignment() and OptimalBlockSize() unsigned int OptimalDataAlignment() const { return GetAlignmentOf(); }