diff options
| author | weidai <weidai11@users.noreply.github.com> | 2007-05-04 15:10:50 +0000 |
|---|---|---|
| committer | weidai <weidai11@users.noreply.github.com> | 2007-05-04 15:10:50 +0000 |
| commit | 5ee13b48aacba73bd46eb3ce6bdc1328c709cdbc (patch) | |
| tree | f27ba515a537694e503655577430ff6ce5d283f9 /arc4.cpp | |
| parent | afa89ae9818c260d4c2149731c6972cee1a01bed (diff) | |
| download | cryptopp-git-5ee13b48aacba73bd46eb3ce6bdc1328c709cdbc.tar.gz | |
use Weak1 namespace
Diffstat (limited to 'arc4.cpp')
| -rw-r--r-- | arc4.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) |
