8 #ifndef BOTAN_BUFFERED_COMPUTATION_H__
9 #define BOTAN_BUFFERED_COMPUTATION_H__
11 #include <botan/secmem.h>
12 #include <botan/get_byte.h>
26 virtual size_t output_length()
const = 0;
33 void update(
const byte in[],
size_t length) { add_data(in, length); }
41 add_data(&in[0], in.
size());
50 for(
size_t i = 0; i !=
sizeof(T); ++i)
65 add_data(reinterpret_cast<const byte*>(str.data()), str.size());
80 void final(
byte out[]) { final_result(out); }
90 final_result(&output[0]);
103 add_data(in, length);
115 add_data(&in[0], in.
size());
138 virtual void add_data(
const byte input[],
size_t length) = 0;
144 virtual void final_result(
byte out[]) = 0;
void update(const std::string &str)
void update(const MemoryRegion< byte > &in)
byte get_byte(size_t byte_num, T input)
SecureVector< byte > process(const std::string &in)
void update(const byte in[], size_t length)
SecureVector< byte > process(const byte in[], size_t length)
virtual ~Buffered_Computation()
SecureVector< byte > process(const MemoryRegion< byte > &in)
void update_be(const T in)