Sourcemeta Core 0.0.0
Loading...
Searching...
No Matches
jose_algorithm.h
1#ifndef SOURCEMETA_CORE_JOSE_ALGORITHM_H_
2#define SOURCEMETA_CORE_JOSE_ALGORITHM_H_
3
4#ifndef SOURCEMETA_CORE_JOSE_EXPORT
5#include <sourcemeta/core/jose_export.h>
6#endif
7
8#include <cstddef> // std::size_t
9#include <cstdint> // std::uint8_t, std::uint16_t
10#include <optional> // std::optional
11#include <string_view> // std::string_view
12
13namespace sourcemeta::core {
14
49
61SOURCEMETA_CORE_JOSE_EXPORT
62auto to_jws_algorithm(const std::string_view value) noexcept
63 -> std::optional<JWSAlgorithm>;
64
76SOURCEMETA_CORE_JOSE_EXPORT
77auto jws_algorithm_name(const JWSAlgorithm algorithm) noexcept
78 -> std::string_view;
79
94SOURCEMETA_CORE_JOSE_EXPORT
95auto jws_algorithm_is_asymmetric(const JWSAlgorithm algorithm) noexcept -> bool;
96
116SOURCEMETA_CORE_JOSE_EXPORT
117auto jws_algorithm_digest_bits(const JWSAlgorithm algorithm) noexcept
118 -> std::uint16_t;
119
147
166
177SOURCEMETA_CORE_JOSE_EXPORT
178auto to_jwe_algorithm(const std::string_view value) noexcept
179 -> std::optional<JWEAlgorithm>;
180
192SOURCEMETA_CORE_JOSE_EXPORT
193auto jwe_algorithm_name(const JWEAlgorithm algorithm) noexcept
194 -> std::string_view;
195
206SOURCEMETA_CORE_JOSE_EXPORT
207auto to_jwe_encryption(const std::string_view value) noexcept
208 -> std::optional<JWEEncryption>;
209
221SOURCEMETA_CORE_JOSE_EXPORT
222auto jwe_encryption_name(const JWEEncryption encryption) noexcept
223 -> std::string_view;
224
239SOURCEMETA_CORE_JOSE_EXPORT
240auto jwe_algorithm_is_asymmetric(const JWEAlgorithm algorithm) noexcept -> bool;
241
257SOURCEMETA_CORE_JOSE_EXPORT
258auto jwe_encryption_key_bytes(const JWEEncryption encryption) noexcept
259 -> std::size_t;
260
261} // namespace sourcemeta::core
262
263#endif
SOURCEMETA_CORE_JOSE_EXPORT auto jwe_algorithm_is_asymmetric(const JWEAlgorithm algorithm) noexcept -> bool
JWEAlgorithm
Definition jose_algorithm.h:125
SOURCEMETA_CORE_JOSE_EXPORT auto jwe_algorithm_name(const JWEAlgorithm algorithm) noexcept -> std::string_view
JWEEncryption
Definition jose_algorithm.h:152
SOURCEMETA_CORE_JOSE_EXPORT auto jwe_encryption_key_bytes(const JWEEncryption encryption) noexcept -> std::size_t
JWSAlgorithm
Definition jose_algorithm.h:21
SOURCEMETA_CORE_JOSE_EXPORT auto jwe_encryption_name(const JWEEncryption encryption) noexcept -> std::string_view
SOURCEMETA_CORE_JOSE_EXPORT auto to_jwe_algorithm(const std::string_view value) noexcept -> std::optional< JWEAlgorithm >
SOURCEMETA_CORE_JOSE_EXPORT auto to_jws_algorithm(const std::string_view value) noexcept -> std::optional< JWSAlgorithm >
SOURCEMETA_CORE_JOSE_EXPORT auto jws_algorithm_digest_bits(const JWSAlgorithm algorithm) noexcept -> std::uint16_t
SOURCEMETA_CORE_JOSE_EXPORT auto jws_algorithm_is_asymmetric(const JWSAlgorithm algorithm) noexcept -> bool
SOURCEMETA_CORE_JOSE_EXPORT auto jws_algorithm_name(const JWSAlgorithm algorithm) noexcept -> std::string_view
SOURCEMETA_CORE_JOSE_EXPORT auto to_jwe_encryption(const std::string_view value) noexcept -> std::optional< JWEEncryption >
@ A192KW
AES-192 Key Wrap.
Definition jose_algorithm.h:141
@ RSA_OAEP
RSAES OAEP using default parameters (SHA-1).
Definition jose_algorithm.h:127
@ A128KW
AES-128 Key Wrap.
Definition jose_algorithm.h:139
@ RSA_OAEP_256
RSAES OAEP using SHA-256.
Definition jose_algorithm.h:129
@ ECDH_ES_A192KW
ECDH-ES using Concat KDF and the CEK wrapped with AES-192 Key Wrap.
Definition jose_algorithm.h:135
@ ECDH_ES_A256KW
ECDH-ES using Concat KDF and the CEK wrapped with AES-256 Key Wrap.
Definition jose_algorithm.h:137
@ ECDH_ES_A128KW
ECDH-ES using Concat KDF and the CEK wrapped with AES-128 Key Wrap.
Definition jose_algorithm.h:133
@ A256KW
AES-256 Key Wrap.
Definition jose_algorithm.h:143
@ DIR
Direct use of a shared symmetric key as the CEK.
Definition jose_algorithm.h:145
@ ECDH_ES
Elliptic Curve Diffie-Hellman Ephemeral Static key agreement, direct.
Definition jose_algorithm.h:131
@ A192CBC_HS384
AES-192 in CBC mode with an HMAC SHA-384 authentication tag.
Definition jose_algorithm.h:162
@ A128CBC_HS256
AES-128 in CBC mode with an HMAC SHA-256 authentication tag.
Definition jose_algorithm.h:160
@ A256GCM
AES-256 in Galois/Counter Mode.
Definition jose_algorithm.h:158
@ A256CBC_HS512
AES-256 in CBC mode with an HMAC SHA-512 authentication tag.
Definition jose_algorithm.h:164
@ A128GCM
AES-128 in Galois/Counter Mode.
Definition jose_algorithm.h:154
@ A192GCM
AES-192 in Galois/Counter Mode.
Definition jose_algorithm.h:156
@ ES384
ECDSA using the NIST P-384 curve and SHA-384.
Definition jose_algorithm.h:37
@ PS384
RSASSA-PSS using SHA-384 and MGF1 with SHA-384.
Definition jose_algorithm.h:31
@ PS512
RSASSA-PSS using SHA-512 and MGF1 with SHA-512.
Definition jose_algorithm.h:33
@ EdDSA
Edwards-curve Digital Signature Algorithm.
Definition jose_algorithm.h:41
@ RS512
RSASSA-PKCS1-v1_5 using SHA-512.
Definition jose_algorithm.h:27
@ ES512
ECDSA using the NIST P-521 curve and SHA-512.
Definition jose_algorithm.h:39
@ RS384
RSASSA-PKCS1-v1_5 using SHA-384.
Definition jose_algorithm.h:25
@ RS256
RSASSA-PKCS1-v1_5 using SHA-256.
Definition jose_algorithm.h:23
@ HS512
HMAC using SHA-512.
Definition jose_algorithm.h:47
@ HS256
HMAC using SHA-256.
Definition jose_algorithm.h:43
@ HS384
HMAC using SHA-384.
Definition jose_algorithm.h:45
@ PS256
RSASSA-PSS using SHA-256 and MGF1 with SHA-256.
Definition jose_algorithm.h:29
@ ES256
ECDSA using the NIST P-256 curve and SHA-256.
Definition jose_algorithm.h:35