我想使用一些加密操作(主要是完整性检查哈希和)。但是,我在查找执行此类操作的文档时遇到问题:
bool read(std::istream &in) {
hasher hv(in);
// Do some operations on hv as if it was std::istream
hash_type h = hv.finish ();
hash_type h2 = read_hash(in);
return h == h2;
}
PS。它可能是不同的库,只要它 a) 与 GPL-3 兼容 b) 在 GNU/Linux 上工作
聚苯乙烯。我不坚持使用crypto++,但是我希望具有类似IOStream的行为,以便与其他C++库进行互操作。