summaryrefslogtreecommitdiff
path: root/arc4.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-05-04 15:10:50 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-05-04 15:10:50 +0000
commitd5c2286093d51a7cd8e4f2e1448473b5545001ea (patch)
treef27ba515a537694e503655577430ff6ce5d283f9 /arc4.h
parentca5713f67f7152d1054c0d6f75c9851f7b01f73c (diff)
downloadcryptopp-d5c2286093d51a7cd8e4f2e1448473b5545001ea.tar.gz
use Weak1 namespace
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@330 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'arc4.h')
-rw-r--r--arc4.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/arc4.h b/arc4.h
index 1942caf..9dcc92e 100644
--- a/arc4.h
+++ b/arc4.h
@@ -5,7 +5,7 @@
NAMESPACE_BEGIN(CryptoPP)
-namespace Weak {
+namespace Weak1 {
//! _
class CRYPTOPP_NO_VTABLE ARC4_Base : public VariableKeyLength<16, 1, 256>, public RandomNumberGenerator, public SymmetricCipher, public SymmetricCipherDocumentation
@@ -15,7 +15,7 @@ public:
static const char *StaticAlgorithmName() {return "ARC4";}
- byte GenerateByte();
+ void GenerateBlock(byte *output, size_t size);
void DiscardBytes(size_t n);
void ProcessData(byte *outString, const byte *inString, size_t length);
@@ -55,12 +55,14 @@ protected:
DOCUMENTED_TYPEDEF(SymmetricCipherFinal<MARC4_Base>, MARC4)
}
-#ifndef CRYPTOPP_ENABLE_NAMESPACE_WEAK
-using namespace Weak;
+#if CRYPTOPP_ENABLE_NAMESPACE_WEAK >= 1
+namespace Weak {using namespace Weak1;} // import Weak1 into CryptoPP::Weak
+#else
+using namespace Weak1; // import Weak1 into CryptoPP with warning
#ifdef __GNUC__
-#warning "You may be using a weak algorithm that has been retained for backwards compatibility. Please define CRYPTOPP_ENABLE_NAMESPACE_WEAK and prepend the class name with 'Weak::' to remove this warning."
+#warning "You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning."
#else
-#pragma message("You may be using a weak algorithm that has been retained for backwards compatibility. Please define CRYPTOPP_ENABLE_NAMESPACE_WEAK and prepend the class name with 'Weak::' to remove this warning.")
+#pragma message("You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning.")
#endif
#endif