| 17 | namespace |
| 18 | { |
| 19 | template <class HashCtx> void resetHash(std::unique_ptr<HashCtx>& ctx, bool create) |
| 20 | { |
| 21 | ctx.reset(create ? new HashCtx : nullptr); |
| 22 | } |
| 23 | |
| 24 | template <class HashCtx> void updateHash(HashCtx& ctx, const uint8_t* buf, size_t len) |
| 25 | { |