Feature #3022
closedAdd constructor of Digest object from std::istream&
100%
Description
Digest object should allow std::istream& as a source for digest creation.
The motivation and use case for this is chronoshare application, which needs calculate digests of files (std::istream's).
Updated by Alex Afanasyev over 9 years ago
Just a little note. I was thinking to allow filename directly, but decided against this: it is either confusing (if std::string is a parameter) or requires unnecessary dependency (boost::filesystem) for the utility header file.
Updated by Junxiao Shi over 9 years ago
One implication for computing digest from std::istream
is that this operation is potential blocking, because std::istream
may be reading from a disk or NFS share.
Is this a concern?
Updated by Alex Afanasyev over 9 years ago
I would say it is ok. Stream operations in general are blocking, so user already should expect non-trivial time for the operation. For the driving use case (chronoshare) there shouldn't be an issue with that.
Updated by Junxiao Shi over 9 years ago
- Status changed from Code review to Closed