32 class HashStream :
public std::basic_streambuf<char, std::char_traits<char> >,
public std::iostream
35 HashStream(
const unsigned int hash,
const size_t buffer = 2048);
38 static std::string
extract(std::istream &stream);
41 virtual void update(
char *buf,
const size_t size) = 0;
42 virtual void finalize(
char * hash,
unsigned int &size) = 0;
45 virtual std::char_traits<char>::int_type
overflow(std::char_traits<char>::int_type = std::char_traits<char>::eof());
46 virtual std::char_traits<char>::int_type
underflow();
50 std::vector<char> data_buf_;
56 std::vector<char> hash_buf_;
59 unsigned int hash_size_;