Crypto++
5.6.4
Free C++ class library of cryptographic schemes
|
Policy object for additive stream ciphers. More...
Public Member Functions | |
virtual unsigned int | GetAlignment () const |
Provides data alignment requirements. More... | |
virtual unsigned int | GetBytesPerIteration () const =0 |
Provides number of bytes operated upon during an iteration. More... | |
virtual unsigned int | GetOptimalBlockSize () const |
Provides number of ideal bytes to process. More... | |
virtual unsigned int | GetIterationsToBuffer () const =0 |
Provides buffer size based on iterations. More... | |
virtual void | WriteKeystream (byte *keystream, size_t iterationCount) |
Generate the keystream. More... | |
virtual bool | CanOperateKeystream () const |
Flag indicating. More... | |
virtual void | OperateKeystream (KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount) |
Operates the keystream. More... | |
virtual void | CipherSetKey (const NameValuePairs ¶ms, const byte *key, size_t length)=0 |
Key the cipher. More... | |
virtual void | CipherResynchronize (byte *keystreamBuffer, const byte *iv, size_t length) |
Resynchronize the cipher. More... | |
virtual bool | CipherIsRandomAccess () const =0 |
Flag indicating random access. More... | |
virtual void | SeekToIteration (lword iterationCount) |
Seeks to a random position in the stream. More... | |
Policy object for additive stream ciphers.
Definition at line 108 of file strciphr.h.
|
inlinevirtual |
Provides data alignment requirements.
Reimplemented in AdditiveCipherConcretePolicy< WT, W, X, BASE >.
Definition at line 116 of file strciphr.h.
|
pure virtual |
Provides number of bytes operated upon during an iteration.
Implemented in AdditiveCipherConcretePolicy< WT, W, X, BASE >.
|
inlinevirtual |
Provides number of ideal bytes to process.
Definition at line 127 of file strciphr.h.
|
pure virtual |
Provides buffer size based on iterations.
Implemented in AdditiveCipherConcretePolicy< WT, W, X, BASE >.
|
inlinevirtual |
Generate the keystream.
keystream | the key stream |
iterationCount | the number of iterations to generate the key stream |
Definition at line 137 of file strciphr.h.
|
inlinevirtual |
Flag indicating.
Reimplemented in AdditiveCipherConcretePolicy< WT, W, X, BASE >.
Definition at line 143 of file strciphr.h.
|
inlinevirtual |
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(). |
Reimplemented in AdditiveCipherConcretePolicy< WT, W, X, BASE >, AdditiveCipherConcretePolicy< word32, 20 >, AdditiveCipherConcretePolicy< word32, 8 >, AdditiveCipherConcretePolicy< word32, 256 >, AdditiveCipherConcretePolicy< word32, 16 >, and AdditiveCipherConcretePolicy< word32, 1, 64 >.
Definition at line 153 of file strciphr.h.
|
pure virtual |
Key the cipher.
params | set of NameValuePairs use to initialize this object |
key | a byte array used to key the cipher |
length | the size of the key array |
Implemented in XSalsa20_Policy.
|
inlinevirtual |
Resynchronize the cipher.
keystreamBuffer | the keystream buffer |
iv | a byte array used to resynchronize the cipher |
length | the size of the IV array |
Reimplemented in XSalsa20_Policy.
Definition at line 166 of file strciphr.h.
|
pure virtual |
Flag indicating random access.
Implemented in CTR_ModePolicy, and OFB_ModePolicy.
|
inlinevirtual |
Seeks to a random position in the stream.
Definition at line 177 of file strciphr.h.