summaryrefslogtreecommitdiff
path: root/basecode.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-11-22 19:11:31 -0500
committerJeffrey Walton <noloader@gmail.com>2015-11-22 19:11:31 -0500
commit62618fda97bbde6d4cc4752101e69839fc4f3b6f (patch)
treebcdacdfed312bb5ac9e4c504ff2a3c293214fe40 /basecode.h
parentc45435812225aa68d122c7de246e5f60b509766c (diff)
downloadcryptopp-git-62618fda97bbde6d4cc4752101e69839fc4f3b6f.tar.gz
Revert botched "Crypto++ 5.6.3 check-in". Corruption due to VMware adding garbage to the end of some source files during drag and drop from guest to host.
This reverts commit c45435812225aa68d122c7de246e5f60b509766c.
Diffstat (limited to 'basecode.h')
-rw-r--r--basecode.h45
1 files changed, 3 insertions, 42 deletions
diff --git a/basecode.h b/basecode.h
index 75c6659f..bce550f4 100644
--- a/basecode.h
+++ b/basecode.h
@@ -14,24 +14,15 @@
NAMESPACE_BEGIN(CryptoPP)
//! \class BaseN_Encoder
-//! \brief Encoder for bases that are a power of 2
+//! \details base n encoder, where n is a power of 2
class CRYPTOPP_DLL BaseN_Encoder : public Unflushable<Filter>
{
public:
- //! \brief Construct a BaseN_Encoder
- //! \param attachment a BufferedTransformation to attach to this object
BaseN_Encoder(BufferedTransformation *attachment=NULL)
: m_alphabet(NULL), m_padding(0), m_bitsPerChar(0)
, m_outputBlockSize(0), m_bytePos(0), m_bitPos(0)
{Detach(attachment);}
- //! \brief Construct a BaseN_Encoder
- //! \param alphabet table of ASCII characters to use as the alphabet
- //! \param log2base the log<sub>2</sub>base
- //! \param attachment a BufferedTransformation to attach to this object
- //! \param padding the character to use as padding
- //! \pre log2base must be between 1 and 7 inclusive
- //! \throws InvalidArgument if log2base is not between 1 and 7
BaseN_Encoder(const byte *alphabet, int log2base, BufferedTransformation *attachment=NULL, int padding=-1)
: m_alphabet(NULL), m_padding(0), m_bitsPerChar(0)
, m_outputBlockSize(0), m_bytePos(0), m_bitPos(0)
@@ -54,27 +45,15 @@ private:
};
//! \class BaseN_Decoder
-//! \brief Decoder for bases that are a power of 2
+//! \details base n encoder, where n is a power of 2
class CRYPTOPP_DLL BaseN_Decoder : public Unflushable<Filter>
{
public:
- //! \brief Construct a BaseN_Decoder
- //! \param attachment a BufferedTransformation to attach to this object
- //! \details padding is set to -1, which means use default padding. If not
- //! required, then the value must be set via IsolatedInitialize().
BaseN_Decoder(BufferedTransformation *attachment=NULL)
: m_lookup(0), m_padding(0), m_bitsPerChar(0)
, m_outputBlockSize(0), m_bytePos(0), m_bitPos(0)
{Detach(attachment);}
- //! \brief Construct a BaseN_Decoder
- //! \param lookup table of values
- //! \param log2base the log<sub>2</sub>base
- //! \param attachment a BufferedTransformation to attach to this object
- //! \details log2base is the exponent (like 5 in 2<sup>5</sup>), and not
- //! the number of elements (like 32).
- //! \details padding is set to -1, which means use default padding. If not
- //! required, then the value must be set via IsolatedInitialize().
BaseN_Decoder(const int *lookup, int log2base, BufferedTransformation *attachment=NULL)
: m_lookup(0), m_padding(0), m_bitsPerChar(0)
, m_outputBlockSize(0), m_bytePos(0), m_bitPos(0)
@@ -86,16 +65,6 @@ public:
void IsolatedInitialize(const NameValuePairs &parameters);
size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking);
- //! \brief Intializes BaseN lookup array
- //! \param lookup table of values
- //! \param alphabet table of ASCII characters
- //! \param base the base for the encoder
- //! \param caseInsensitive flag indicating whether the alpabet is case sensitivie
- //! \pre COUNTOF(lookup) == 256
- //! \pre COUNTOF(alphabet) == base
- //! \details Internally, the function sets the first 256 elements in the lookup table to
- // their value from the alphabet array or -1. base is the number of element (like 32),
- //! and not an exponent (like 5 in 2<sup>5</sup>)
static void CRYPTOPP_API InitializeDecodingLookupArray(int *lookup, const byte *alphabet, unsigned int base, bool caseInsensitive);
private:
@@ -105,21 +74,13 @@ private:
SecByteBlock m_outBuf;
};
-//! \class Grouper
-//! \brief Filter that breaks input stream into groups of fixed size
+//! filter that breaks input stream into groups of fixed size
class CRYPTOPP_DLL Grouper : public Bufferless<Filter>
{
public:
- //! \brief Construct a Grouper
- //! \param attachment a BufferedTransformation to attach to this object
Grouper(BufferedTransformation *attachment=NULL)
: m_groupSize(0), m_counter(0) {Detach(attachment);}
- //! \brief Construct a Grouper
- //! \param groupSize the size of the grouping
- //! \param separator the separator to use between groups
- //! \param terminator the terminator appeand after processing
- //! \param attachment a BufferedTransformation to attach to this object
Grouper(int groupSize, const std::string &separator, const std::string &terminator, BufferedTransformation *attachment=NULL)
: m_groupSize(0), m_counter(0)
{