9 #include <botan/internal/xor_buf.h>
44 void OFB::key_schedule(
const byte key[],
size_t key_len)
46 permutation->
set_key(key, key_len);
57 return (
"OFB(" + permutation->
name() +
")");
65 while(length >= buffer.
size() - position)
67 xor_buf(out, in, &buffer[position], buffer.
size() - position);
68 length -= (buffer.
size() - position);
69 in += (buffer.
size() - position);
70 out += (buffer.
size() - position);
74 xor_buf(out, in, &buffer[position], length);
87 buffer.
copy(0, iv, iv_len);
void set_iv(const byte iv[], size_t iv_len)
void copy(const T in[], size_t n)
void set_key(const SymmetricKey &key)
void cipher(const byte in[], byte out[], size_t length)
virtual std::string name() const =0
void encrypt(const byte in[], byte out[]) const
void xor_buf(byte out[], const byte in[], size_t length)
void zeroise(MemoryRegion< T > &vec)
virtual size_t block_size() const =0
bool valid_iv_length(size_t iv_len) const