28 : iostream(this), data_buf_(buffer), data_size_(buffer), hash_buf_(hash), hash_size_(hash), final_(false)
32 setp(&data_buf_[0], &data_buf_[0] + data_size_ - 1);
41 std::stringstream buf;
42 buf << stream.rdbuf();
48 int ret = std::char_traits<char>::eq_int_type(this->
overflow(
49 std::char_traits<char>::eof()), std::char_traits<char>::eof()) ? -1
57 char *ibegin = &data_buf_[0];
61 setp(&data_buf_[0], &data_buf_[0] + data_size_ - 1);
63 if (!std::char_traits<char>::eq_int_type(c, std::char_traits<char>::eof()))
65 *iend++ = std::char_traits<char>::to_char_type(c);
69 if ((iend - ibegin) == 0)
71 return std::char_traits<char>::not_eof(c);
75 update(&data_buf_[0], (iend - ibegin));
77 return std::char_traits<char>::not_eof(c);
91 setg(&hash_buf_[0], &hash_buf_[0], &hash_buf_[0] + hash_size_);
93 return std::char_traits<char>::not_eof(hash_buf_[0]);
96 return std::char_traits<char>::eof();