Fabcoin Core
0.16.2
P2P Digital Currency
|
Base class for additive stream ciphers. More...
#include <strciphr.h>
Public Types | |
typedef WT | WordType |
Public Member Functions | |
unsigned int | GetAlignment () const |
Provides data alignment requirements. More... | |
unsigned int | GetBytesPerIteration () const |
Provides number of bytes operated upon during an iteration. More... | |
unsigned int | GetIterationsToBuffer () const |
Provides buffer size based on iterations. More... | |
bool | CanOperateKeystream () const |
Flag indicating. More... | |
virtual void | OperateKeystream (KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount)=0 |
Operates the keystream. More... | |
Base class for additive stream ciphers.
WT | word type |
W | count of words |
X | bytes per iteration count |
BASE | AdditiveCipherAbstractPolicy derived base class |
Definition at line 186 of file strciphr.h.
typedef WT AdditiveCipherConcretePolicy< WT, W, X, BASE >::WordType |
Definition at line 188 of file strciphr.h.
|
inline |
Flag indicating.
Definition at line 211 of file strciphr.h.
|
inline |
Provides data alignment requirements.
Internally, the default implementation returns 1. If the stream cipher is implemented using an SSE2 ASM or intrinsics, then the value returned is usually 16.
Definition at line 196 of file strciphr.h.
|
inline |
Provides number of bytes operated upon during an iteration.
Definition at line 202 of file strciphr.h.
|
inline |
Provides buffer size based on iterations.
Definition at line 206 of file strciphr.h.
|
pure virtual |
Operates the keystream.
operation | the operation with additional flags |
output | the output buffer |
input | the input buffer |
iterationCount | the number of iterations to perform on the input |
OperateKeystream() will attempt to operate upon GetOptimalBlockSize() buffer, which will be derived from GetBytesPerIteration().
Implemented in PanamaCipherPolicy< B >, WAKE_Policy< B >, ChaCha_Policy< R >, SosemanukPolicy, Salsa20_Policy, and SEAL_Policy< B >.