summaryrefslogtreecommitdiff
path: root/arc4.cpp
diff options
context:
space:
mode:
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)