9 #include <botan/internal/xor_buf.h>    20    cipher(ciph), padder(pad)
    36    cipher(ciph), padder(pad)
    62 void CBC_Encryption::buffered_block(
const byte input[], 
size_t length)
    64    size_t blocks = length / state.
size();
    66    for(
size_t i = 0; i != blocks; ++i)
    77 void CBC_Encryption::buffered_final(
const byte input[], 
size_t length)
    80       buffered_block(input, length);
    85 void CBC_Encryption::write(
const byte input[], 
size_t input_length)
    90 void CBC_Encryption::end_msg()
    95    padder->
pad(padding, padding.size(), last_block);
   109    return (cipher->
name() + 
"/CBC/" + padder->
name());
   118    cipher(ciph), padder(pad)
   135    cipher(ciph), padder(pad)
   162 void CBC_Decryption::buffered_block(
const byte input[], 
size_t length)
   165    size_t blocks = length / cipher->
block_size();
   169       size_t to_proc = std::min<size_t>(blocks, blocks_in_temp);
   171       cipher->
decrypt_n(input, &temp[0], to_proc);
   175       for(
size_t i = 1; i < to_proc; ++i)
   194 void CBC_Decryption::buffered_final(
const byte input[], 
size_t length)
   196    if(length == 0 || length % cipher->
block_size() != 0)
   199    size_t extra_blocks = (length - 1) / cipher->
block_size();
   201    buffered_block(input, extra_blocks * cipher->
block_size());
   215 void CBC_Decryption::write(
const byte input[], 
size_t length)
   223 void CBC_Decryption::end_msg()
   233    return (cipher->
name() + 
"/CBC/" + padder->
name());
 
bool valid_iv_length(size_t iv_len) const
virtual bool valid_blocksize(size_t block_size) const =0
bool valid_iv_length(size_t iv_len) const
virtual size_t pad_bytes(size_t block_size, size_t position) const
void set_iv(const InitializationVector &iv)
CBC_Encryption(BlockCipher *cipher, BlockCipherModePaddingMethod *padding)
void write(const byte in[], size_t length)
void decrypt(const byte in[], byte out[]) const
void send(const byte in[], size_t length)
void encrypt(const byte in[], byte out[]) const
size_t current_position() const
void copy_mem(T *out, const T *in, size_t n)
virtual std::string name() const =0
CBC_Decryption(BlockCipher *cipher, BlockCipherModePaddingMethod *padding)
void set_key(const SymmetricKey &key)
size_t buffered_block_size() const
void set_key(const SymmetricKey &key)
SecureVector< byte > bits_of() const
void xor_buf(byte out[], const byte in[], size_t length)
virtual void decrypt_n(const byte in[], byte out[], size_t blocks) const =0
virtual std::string name() const =0
virtual size_t block_size() const =0
virtual size_t unpad(const byte block[], size_t size) const =0
virtual void pad(byte block[], size_t size, size_t current_position) const =0
void set_iv(const InitializationVector &iv)