summaryrefslogtreecommitdiff
path: root/arc4.h
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2007-04-16 21:27:41 +0000
committerweidai <weidai11@users.noreply.github.com>2007-04-16 21:27:41 +0000
commitdeb3228e837c9f911bdb12bb116b56cc75d639df (patch)
tree81e5d1810a0a25fa10d3067481851de431fe4086 /arc4.h
parent3a3fef7436c4093908dee7a03bfcae6366f5ba95 (diff)
downloadcryptopp-git-deb3228e837c9f911bdb12bb116b56cc75d639df.tar.gz
move ARC4 into Weak namespace
Diffstat (limited to 'arc4.h')
-rw-r--r--arc4.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arc4.h b/arc4.h
index 78f85cd0..1942cafd 100644
--- a/arc4.h
+++ b/arc4.h
@@ -5,6 +5,8 @@
NAMESPACE_BEGIN(CryptoPP)
+namespace Weak {
+
//! _
class CRYPTOPP_NO_VTABLE ARC4_Base : public VariableKeyLength<16, 1, 256>, public RandomNumberGenerator, public SymmetricCipher, public SymmetricCipherDocumentation
{
@@ -52,6 +54,16 @@ protected:
//! Modified ARC4: it discards the first 256 bytes of keystream which may be weaker than the rest
DOCUMENTED_TYPEDEF(SymmetricCipherFinal<MARC4_Base>, MARC4)
+}
+#ifndef CRYPTOPP_ENABLE_NAMESPACE_WEAK
+using namespace Weak;
+#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."
+#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.")
+#endif
+#endif
+
NAMESPACE_END
#endif