73 return blockCipher->
setKey(key, len);
80 memcpy(this->iv, iv, 16);
105 iv[posn] ^= *input++;
106 *output++ = iv[posn++];
132 uint8_t in = *input++;
133 *output++ = iv[posn] ^ in;
142 blockCipher->
clear();
virtual void clear()=0
Clears all security-sensitive state from this block cipher.
virtual size_t blockSize() const =0
Size of a single block processed by this cipher, in bytes.
virtual bool setKey(const uint8_t *key, size_t len)=0
Sets the key to use for future encryption and decryption operations.
virtual void encryptBlock(uint8_t *output, const uint8_t *input)=0
Encrypts a single block using this cipher.
virtual size_t keySize() const =0
Default size of the key for this block cipher, in bytes.
size_t keySize() const
Default size of the key for this cipher, in bytes.
bool setKey(const uint8_t *key, size_t len)
Sets the key to use for future encryption and decryption operations.
void encrypt(uint8_t *output, const uint8_t *input, size_t len)
Encrypts an input buffer and writes the ciphertext to an output buffer.
bool setIV(const uint8_t *iv, size_t len)
Sets the initialization vector to use for future encryption and decryption operations.
size_t ivSize() const
Size of the initialization vector for this cipher, in bytes.
void clear()
Clears all security-sensitive state from this cipher.
void decrypt(uint8_t *output, const uint8_t *input, size_t len)
Decrypts an input buffer and writes the plaintext to an output buffer.
CFBCommon()
Constructs a new cipher in CFB mode.
virtual ~CFBCommon()
Destroys this cipher object after clearing sensitive information.