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_error.h>
26#include <sourcemeta/core/crypto_fnv128.h>
27#include <sourcemeta/core/crypto_hkdf.h>
28#include <sourcemeta/core/crypto_hmac_sha256.h>
29#include <sourcemeta/core/crypto_hmac_sha384.h>
30#include <sourcemeta/core/crypto_hmac_sha512.h>
31#include <sourcemeta/core/crypto_rsa_oaep.h>
32#include <sourcemeta/core/crypto_secure.h>
33#include <sourcemeta/core/crypto_sha1.h>
34#include <sourcemeta/core/crypto_sha256.h>
35#include <sourcemeta/core/crypto_sha384.h>
36#include <sourcemeta/core/crypto_sha512.h>
37#include <sourcemeta/core/crypto_sign.h>
38#include <sourcemeta/core/crypto_uuid.h>
39#include <sourcemeta/core/crypto_verify.h>
40
41#include <cstddef> // std::size_t
42#include <cstdint> // std::uint8_t
43#include <span> // std::span
44#include <string> // std::string
45#include <string_view> // std::string_view
46
47namespace sourcemeta::core {
48
65auto SOURCEMETA_CORE_CRYPTO_EXPORT random_bytes(std::span<std::uint8_t> buffer)
66 -> void;
67
80auto SOURCEMETA_CORE_CRYPTO_EXPORT random_bytes(const std::size_t length)
81 -> std::string;
82
97auto SOURCEMETA_CORE_CRYPTO_EXPORT secure_equals(
98 const std::string_view left, const std::string_view right) noexcept -> bool;
99
100} // namespace sourcemeta::core
101
102#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