summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP/crypto/basecode.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-07-20 16:21:49 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-07-20 16:21:49 +0000
commitf424a18112032cf61d2871a6b91a5af607c171ae (patch)
tree88fedc4e28941ceecda7026f0b06eba6271f91d5 /plugins/CryptoPP/crypto/basecode.h
parentbfe1bd0fc087be44c70904aee0fe4276643d206d (diff)
CryptoPP:
changed folder structure git-svn-id: http://svn.miranda-ng.org/main/trunk@1083 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CryptoPP/crypto/basecode.h')
-rw-r--r--plugins/CryptoPP/crypto/basecode.h86
1 files changed, 0 insertions, 86 deletions
diff --git a/plugins/CryptoPP/crypto/basecode.h b/plugins/CryptoPP/crypto/basecode.h
deleted file mode 100644
index a20623ae0b..0000000000
--- a/plugins/CryptoPP/crypto/basecode.h
+++ /dev/null
@@ -1,86 +0,0 @@
-#ifndef CRYPTOPP_BASECODE_H
-#define CRYPTOPP_BASECODE_H
-
-#include "filters.h"
-#include "algparam.h"
-#include "argnames.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-//! base n encoder, where n is a power of 2
-class CRYPTOPP_DLL BaseN_Encoder : public Unflushable<Filter>
-{
-public:
- BaseN_Encoder(BufferedTransformation *attachment=NULL)
- {Detach(attachment);}
-
- BaseN_Encoder(const byte *alphabet, int log2base, BufferedTransformation *attachment=NULL, int padding=-1)
- {
- Detach(attachment);
- IsolatedInitialize(MakeParameters(Name::EncodingLookupArray(), alphabet)
- (Name::Log2Base(), log2base)
- (Name::Pad(), padding != -1)
- (Name::PaddingByte(), byte(padding)));
- }
-
- void IsolatedInitialize(const NameValuePairs &parameters);
- size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking);
-
-private:
- const byte *m_alphabet;
- int m_padding, m_bitsPerChar, m_outputBlockSize;
- int m_bytePos, m_bitPos;
- SecByteBlock m_outBuf;
-};
-
-//! base n decoder, where n is a power of 2
-class CRYPTOPP_DLL BaseN_Decoder : public Unflushable<Filter>
-{
-public:
- BaseN_Decoder(BufferedTransformation *attachment=NULL)
- {Detach(attachment);}
-
- BaseN_Decoder(const int *lookup, int log2base, BufferedTransformation *attachment=NULL)
- {
- Detach(attachment);
- IsolatedInitialize(MakeParameters(Name::DecodingLookupArray(), lookup)(Name::Log2Base(), log2base));
- }
-
- void IsolatedInitialize(const NameValuePairs &parameters);
- size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking);
-
- static void CRYPTOPP_API InitializeDecodingLookupArray(int *lookup, const byte *alphabet, unsigned int base, bool caseInsensitive);
-
-private:
- const int *m_lookup;
- int m_padding, m_bitsPerChar, m_outputBlockSize;
- int m_bytePos, m_bitPos;
- SecByteBlock m_outBuf;
-};
-
-//! filter that breaks input stream into groups of fixed size
-class CRYPTOPP_DLL Grouper : public Bufferless<Filter>
-{
-public:
- Grouper(BufferedTransformation *attachment=NULL)
- {Detach(attachment);}
-
- Grouper(int groupSize, const std::string &separator, const std::string &terminator, BufferedTransformation *attachment=NULL)
- {
- Detach(attachment);
- IsolatedInitialize(MakeParameters(Name::GroupSize(), groupSize)
- (Name::Separator(), ConstByteArrayParameter(separator))
- (Name::Terminator(), ConstByteArrayParameter(terminator)));
- }
-
- void IsolatedInitialize(const NameValuePairs &parameters);
- size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking);
-
-private:
- SecByteBlock m_separator, m_terminator;
- size_t m_groupSize, m_counter;
-};
-
-NAMESPACE_END
-
-#endif