diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-11-18 15:32:28 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-11-18 15:32:28 -0500 |
commit | 6ac1e46a1fb01f01705b67dd553d5ba317b1dc3e (patch) | |
tree | f0d873d0b377a91dce5ee384e60426ef57efc92b /rc2.h | |
parent | d2fda9bd4231a7dfcb44e59150f11246d992843f (diff) | |
download | cryptopp-git-6ac1e46a1fb01f01705b67dd553d5ba317b1dc3e.tar.gz |
Cleared issues 11,12,13 (Clang integrated assembler), 58 (RC rollup), 66 (Coverity rollup)
Diffstat (limited to 'rc2.h')
-rw-r--r-- | rc2.h | 30 |
1 files changed, 25 insertions, 5 deletions
@@ -1,16 +1,18 @@ +// rc2.h - written and placed in the public domain by Wei Dai
+//! \file rc2.h
+//! \brief Class file for the RC2 stream cipher
+
#ifndef CRYPTOPP_RC2_H
#define CRYPTOPP_RC2_H
-/** \file
-*/
-
#include "seckey.h"
#include "secblock.h"
#include "algparam.h"
NAMESPACE_BEGIN(CryptoPP)
-//! _
+//! \class RC2_Info
+//! \brief The RC2 cipher's key, iv, block size and name information.
struct RC2_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 128>
{
CRYPTOPP_CONSTANT(DEFAULT_EFFECTIVE_KEYLENGTH = 1024)
@@ -18,9 +20,14 @@ struct RC2_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 128> static const char *StaticAlgorithmName() {return "RC2";}
};
-/// <a href="http://www.weidai.com/scan-mirror/cs.html#RC2">RC2</a>
+//! \class RC2
+//! \brief The RC2 stream cipher
+//! \sa <a href="http://www.weidai.com/scan-mirror/cs.html#RC2">RC2</a> on the Crypto Lounge.
class RC2 : public RC2_Info, public BlockCipherDocumentation
{
+ //! \class Base
+ //! \brief Class specific methods used to operate the cipher.
+ //! \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<RC2_Info>
{
public:
@@ -31,12 +38,18 @@ class RC2 : public RC2_Info, public BlockCipherDocumentation FixedSizeSecBlock<word16, 64> K; // expanded key table
};
+ //! \class Enc
+ //! \brief Class specific methods used to operate the cipher in the forward direction.
+ //! \details Implementations and overrides in \p Enc apply to \p ENCRYPTION.
class CRYPTOPP_NO_VTABLE Enc : public Base
{
public:
void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
};
+ //! \class Dec
+ //! \brief Class specific methods used to operate the cipher in the reverse direction.
+ //! \details Implementations and overrides in \p Dec apply to \p DECRYPTION.
class CRYPTOPP_NO_VTABLE Dec : public Base
{
public:
@@ -44,6 +57,10 @@ class RC2 : public RC2_Info, public BlockCipherDocumentation };
public:
+
+ //! \class Encryption
+ //! \brief Class specific methods used to operate the cipher in the forward direction.
+ //! \details Implementations and overrides in \p Encryption apply to \p ENCRYPTION.
class Encryption : public BlockCipherFinal<ENCRYPTION, Enc>
{
public:
@@ -54,6 +71,9 @@ public: {SetKey(key, keyLen, MakeParameters("EffectiveKeyLength", effectiveKeyLen));}
};
+ //! \class Decryption
+ //! \brief Class specific methods used to operate the cipher in the reverse direction.
+ //! \details Implementations and overrides in \p Decryption apply to \p DECRYPTION.
class Decryption : public BlockCipherFinal<DECRYPTION, Dec>
{
public:
|