![]() |
AnCH Framework
0.1
Another C++ Hack Framework
|
Output feedback implementation. More...
#include <ofb.hpp>
Public Member Functions | |
OFB (const std::array< uint8_t, Cipher::getBlockSize()> &initVect, unsigned int nbThread=1) | |
virtual | ~OFB () |
![]() | |
void | cipher (std::istream &input, std::ostream &output, const std::string &key) |
void | decipher (std::istream &input, std::ostream &output, const std::string &key) |
void | setNbThread (unsigned int nbThread) |
Protected Member Functions | |
virtual std::size_t | cipherBlock (std::array< uint8_t, Cipher::getBlockSize()> &input, std::streamsize nbRead, std::array< uint8_t, Cipher::getBlockSize()> &output, uint32_t, Cipher &cipher) override |
virtual std::size_t | decipherBlock (std::array< uint8_t, Cipher::getBlockSize()> &input, std::array< uint8_t, Cipher::getBlockSize()> &, std::streamsize nbRead, bool, std::array< uint8_t, Cipher::getBlockSize()> &output, uint32_t, Cipher &cipher) override |
virtual const std::array< uint8_t, Cipher::getBlockSize()> & | reset () |
![]() | |
BlockCipherModeOfOperation (bool cipherParallelizable, bool decipherParallelizable, unsigned int nbThread=1) | |
virtual | ~BlockCipherModeOfOperation () |
Output feedback implementation.
OFB can not be parallelized.
|
inline |
OFB constructor
initVect | the initialization vector |
nbThread | the maximum number of thread to run in parallel (default to 1). If is set to 0, it will be set to the number of CPU if found (1 otherwise). |
|
inlinevirtual |
OFB destructor
|
inlineoverrideprotectedvirtual |
Cipher a block.
This method will handle initialization vector management.
input | the input block to cipher |
nbRead | the size of block which has been read |
output | the output block |
cipher | the cipher instance |
Implements anch::crypto::BlockCipherModeOfOperation< OFB< Cipher >, Cipher >.
|
inlineoverrideprotectedvirtual |
Decipher a block.
This method will handle initialization vector management.
input | the input block to decipher |
nbRead | the size of block which has been read |
output | the output block |
cipher | the cipher instance |
Implements anch::crypto::BlockCipherModeOfOperation< OFB< Cipher >, Cipher >.
|
inlineprotectedvirtual |
Reset block cipher mode of operation context
Implements anch::crypto::BlockCipherModeOfOperation< OFB< Cipher >, Cipher >.