Sourcemeta Core 0.0.0
Loading...
Searching...
No Matches
crypto_sha256.h
1#ifndef SOURCEMETA_CORE_CRYPTO_SHA256_H_
2#define SOURCEMETA_CORE_CRYPTO_SHA256_H_
3
4#ifndef SOURCEMETA_CORE_CRYPTO_EXPORT
5#include <sourcemeta/core/crypto_export.h>
6#endif
7
8#include <array> // std::array
9#include <cstdint> // std::uint8_t
10#include <ostream> // std::ostream
11#include <span> // std::span
12#include <string> // std::string
13#include <string_view> // std::string_view
14
15namespace sourcemeta::core {
16
29auto SOURCEMETA_CORE_CRYPTO_EXPORT sha256(const std::string_view input,
30 std::ostream &output) -> void;
31
42auto SOURCEMETA_CORE_CRYPTO_EXPORT sha256(const std::string_view input)
43 -> std::string;
44
55auto SOURCEMETA_CORE_CRYPTO_EXPORT sha256_digest(const std::string_view input)
56 -> std::array<std::uint8_t, 32>;
57
72auto SOURCEMETA_CORE_CRYPTO_EXPORT sha256_digest(
73 std::span<const std::string_view> input) -> std::array<std::uint8_t, 32>;
74
75} // namespace sourcemeta::core
76
77#endif
auto SOURCEMETA_CORE_CRYPTO_EXPORT sha256_digest(const std::string_view input) -> std::array< std::uint8_t, 32 >
auto SOURCEMETA_CORE_CRYPTO_EXPORT sha256(const std::string_view input, std::ostream &output) -> void