Sourcemeta Core 0.0.0
Loading...
Searching...
No Matches
crypto.h
1#ifndef SOURCEMETA_CORE_CRYPTO_H_
2#define SOURCEMETA_CORE_CRYPTO_H_
3
4#ifndef SOURCEMETA_CORE_CRYPTO_EXPORT
5#include <sourcemeta/core/crypto_export.h>
6#endif
7
18
19#include <sourcemeta/core/crypto_aes_cbc_hmac.h>
20#include <sourcemeta/core/crypto_aes_gcm.h>
21#include <sourcemeta/core/crypto_aes_kw.h>
22#include <sourcemeta/core/crypto_base64.h>
23#include <sourcemeta/core/crypto_crc32.h>
24#include <sourcemeta/core/crypto_ecdh.h>
25#include <sourcemeta/core/crypto_fnv128.h>
26#include <sourcemeta/core/crypto_hmac_sha256.h>
27#include <sourcemeta/core/crypto_hmac_sha384.h>
28#include <sourcemeta/core/crypto_hmac_sha512.h>
29#include <sourcemeta/core/crypto_rsa_oaep.h>
30#include <sourcemeta/core/crypto_secure.h>
31#include <sourcemeta/core/crypto_sha1.h>
32#include <sourcemeta/core/crypto_sha256.h>
33#include <sourcemeta/core/crypto_sha384.h>
34#include <sourcemeta/core/crypto_sha512.h>
35#include <sourcemeta/core/crypto_sign.h>
36#include <sourcemeta/core/crypto_uuid.h>
37#include <sourcemeta/core/crypto_verify.h>
38
39#include <cstddef> // std::size_t
40#include <cstdint> // std::uint8_t
41#include <span> // std::span
42#include <string> // std::string
43#include <string_view> // std::string_view
44
45namespace sourcemeta::core {
46
63auto SOURCEMETA_CORE_CRYPTO_EXPORT random_bytes(std::span<std::uint8_t> buffer)
64 -> void;
65
78auto SOURCEMETA_CORE_CRYPTO_EXPORT random_bytes(const std::size_t length)
79 -> std::string;
80
95auto SOURCEMETA_CORE_CRYPTO_EXPORT secure_equals(
96 const std::string_view left, const std::string_view right) noexcept -> bool;
97
98} // namespace sourcemeta::core
99
100#endif
auto SOURCEMETA_CORE_CRYPTO_EXPORT secure_equals(const std::string_view left, const std::string_view right) noexcept -> bool
auto SOURCEMETA_CORE_CRYPTO_EXPORT random_bytes(std::span< std::uint8_t > buffer) -> void