MCPcopy Create free account
hub / github.com/LUX-Core/lux / ProcessData

Method ProcessData

src/cryptopp/arc4.cpp:73–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void ARC4_Base::ProcessData(byte *outString, const byte *inString, size_t length)
74{
75 if (length == 0)
76 return;
77
78 byte *const s = m_state;
79 unsigned int x = m_x;
80 unsigned int y = m_y;
81
82 if (inString == outString)
83 {
84 do
85 {
86 *outString++ ^= MakeByte(x, y, s);
87 } while (--length);
88 }
89 else
90 {
91 do
92 {
93 *outString++ = *inString++ ^ byte(MakeByte(x, y, s));
94 }
95 while(--length);
96 }
97
98 m_x = byte(x);
99 m_y = byte(y);
100}
101
102void ARC4_Base::DiscardBytes(size_t length)
103{

Callers 12

writeFrameMethod · 0.45
authAndDecryptHeaderMethod · 0.45
authAndDecryptFrameMethod · 0.45
updateMACMethod · 0.45
encryptAES128CTRMethod · 0.45
decryptAES128CTRMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
ValidateBlowfishFunction · 0.45
LastPutMethod · 0.45

Calls 1

MakeByteFunction · 0.85

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36