8#ifndef BOTAN_BUFFERED_COMPUTATION_H__
9#define BOTAN_BUFFERED_COMPUTATION_H__
11#include <botan/secmem.h>
12#include <botan/get_byte.h>
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());
72 void update(
byte in) { add_data(&in, 1); }
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;
virtual ~Buffered_Computation()
void update(const std::string &str)
SecureVector< byte > process(const MemoryRegion< byte > &in)
void update(const byte in[], size_t length)
SecureVector< byte > process(const byte in[], size_t length)
virtual size_t output_length() const =0
void update_be(const T in)
void update(const MemoryRegion< byte > &in)
SecureVector< byte > process(const std::string &in)
byte get_byte(size_t byte_num, T input)