#ifndef FORTUNA_UTIL_H #define FORTUNA_UTIL_H #include #include #include namespace fortuna { class Util final { public: static auto do_sha(const std::string& str_to_hash) -> const std::string { // do sha256 std::string digest; // no reason not to go for Keccak CryptoPP::SHA3_256 sha3_256; CryptoPP::StringSource str_src(str_to_hash, true, new CryptoPP::HashFilter ( sha3_256, new CryptoPP::HexEncoder( new CryptoPP::StringSink(digest), false)) ); return digest; } Util() = delete; ~Util() noexcept; }; // class Util } // namespace fortuna #endif//FORTUNA_UTIL_H