1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// mbedtls_wrapper.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include <string>
12
13namespace duckdb_mbedtls {
14class MbedTlsWrapper {
15public:
16 static void ComputeSha256Hash(const char* in, size_t in_len, char* out);
17 static std::string ComputeSha256Hash(const std::string& file_content);
18 static bool IsValidSha256Signature(const std::string& pubkey, const std::string& signature, const std::string& sha256_hash);
19 static void Hmac256(const char* key, size_t key_len, const char* message, size_t message_len, char* out);
20
21 static constexpr size_t SHA256_HASH_BYTES = 32;
22};
23}
24