#pragma once #include "common/crypto/utility.h" #include "openssl/bytestring.h" #include "openssl/hmac.h" #include "openssl/sha.h" namespace Envoy { namespace Common { namespace Crypto { class UtilityImpl : public Envoy::Common::Crypto::Utility { public: std::vector getSha256Digest(const Buffer::Instance& buffer) override; std::vector getSha256Hmac(const std::vector& key, absl::string_view message) override; const VerificationOutput verifySignature(absl::string_view hash, CryptoObject& key, const std::vector& signature, const std::vector& text) override; CryptoObjectPtr importPublicKey(const std::vector& key) override; private: const EVP_MD* getHashFunction(absl::string_view name); }; } // namespace Crypto } // namespace Common } // namespace Envoy