summaryrefslogtreecommitdiff
path: root/arc4.cpp
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.cpp
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.cpp')
-rw-r--r--arc4.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/arc4.cpp b/arc4.cpp
index 0beeb24..b5c2730 100644
--- a/arc4.cpp
+++ b/arc4.cpp
@@ -7,11 +7,11 @@
// completely in the public domain.
#include "pch.h"
-#define CRYPTOPP_ENABLE_NAMESPACE_WEAK
+#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
#include "arc4.h"
NAMESPACE_BEGIN(CryptoPP)
-namespace Weak {
+namespace Weak1 {
void ARC4_TestInstantiations()
{
@@ -62,9 +62,10 @@ static inline unsigned int MakeByte(T &x, T &y, byte *s)
return s[(a+b) & 0xff];
}
-byte ARC4_Base::GenerateByte()
+void ARC4_Base::GenerateBlock(byte *output, size_t size)
{
- return MakeByte(m_x, m_y, m_state);
+ while (size--)
+ *output++ = MakeByte(m_x, m_y, m_state);
}
void ARC4_Base::ProcessData(byte *outString, const byte *inString, size_t length)