crypto#
Include dependency graph for crypto.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"4" [label="openssl/rand.h" tooltip="openssl/rand.h"]
"16" [label="variant" tooltip="variant"]
"6" [label="openssl/x509.h" tooltip="openssl/x509.h"]
"5" [label="openssl/sha.h" tooltip="openssl/sha.h"]
"7" [label="utility.h" tooltip="utility.h"]
"13" [label="string" tooltip="string"]
"14" [label="string_view" tooltip="string_view"]
"9" [label="condition_variable" tooltip="condition_variable"]
"12" [label="optional" tooltip="optional"]
"1" [label="src/crypto.h" tooltip="src/crypto.h" fillcolor="#BFBFBF"]
"17" [label="vector" tooltip="vector"]
"2" [label="array" tooltip="array"]
"3" [label="openssl/evp.h" tooltip="openssl/evp.h"]
"11" [label="mutex" tooltip="mutex"]
"15" [label="type_traits" tooltip="type_traits"]
"8" [label="algorithm" tooltip="algorithm"]
"10" [label="memory" tooltip="memory"]
"7" -> "8" [dir=forward tooltip="include"]
"7" -> "9" [dir=forward tooltip="include"]
"7" -> "10" [dir=forward tooltip="include"]
"7" -> "11" [dir=forward tooltip="include"]
"7" -> "12" [dir=forward tooltip="include"]
"7" -> "13" [dir=forward tooltip="include"]
"7" -> "14" [dir=forward tooltip="include"]
"7" -> "15" [dir=forward tooltip="include"]
"7" -> "16" [dir=forward tooltip="include"]
"7" -> "17" [dir=forward tooltip="include"]
"1" -> "2" [dir=forward tooltip="include"]
"1" -> "3" [dir=forward tooltip="include"]
"1" -> "4" [dir=forward tooltip="include"]
"1" -> "5" [dir=forward tooltip="include"]
"1" -> "6" [dir=forward tooltip="include"]
"1" -> "7" [dir=forward tooltip="include"]
}](../../_images/graphviz-aca1c0d6631831659c4c3b52bc633d235f96c036.png)
This graph shows which files directly or indirectly include crypto.h:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"8" [label="src/process.h" tooltip="src/process.h"]
"3" [label="src/crypto.cpp" tooltip="src/crypto.cpp"]
"7" [label="src/config.cpp" tooltip="src/config.cpp"]
"11" [label="src/upnp.cpp" tooltip="src/upnp.cpp"]
"9" [label="src/main.cpp" tooltip="src/main.cpp"]
"5" [label="src/process.cpp" tooltip="src/process.cpp"]
"1" [label="src/crypto.h" tooltip="src/crypto.h" fillcolor="#BFBFBF"]
"12" [label="src/stream.h" tooltip="src/stream.h"]
"10" [label="src/stream.cpp" tooltip="src/stream.cpp"]
"2" [label="src/confighttp.cpp" tooltip="src/confighttp.cpp"]
"6" [label="src/rtsp.h" tooltip="src/rtsp.h"]
"4" [label="src/httpcommon.cpp" tooltip="src/httpcommon.cpp"]
"8" -> "2" [dir=back tooltip="include"]
"8" -> "4" [dir=back tooltip="include"]
"8" -> "9" [dir=back tooltip="include"]
"8" -> "5" [dir=back tooltip="include"]
"8" -> "10" [dir=back tooltip="include"]
"1" -> "2" [dir=back tooltip="include"]
"1" -> "3" [dir=back tooltip="include"]
"1" -> "4" [dir=back tooltip="include"]
"1" -> "5" [dir=back tooltip="include"]
"1" -> "6" [dir=back tooltip="include"]
"1" -> "12" [dir=back tooltip="include"]
"12" -> "10" [dir=back tooltip="include"]
"12" -> "11" [dir=back tooltip="include"]
"6" -> "7" [dir=back tooltip="include"]
"6" -> "2" [dir=back tooltip="include"]
"6" -> "4" [dir=back tooltip="include"]
"6" -> "8" [dir=back tooltip="include"]
"6" -> "11" [dir=back tooltip="include"]
}](../../_images/graphviz-10e4c03686d02b72866daa9b0a25a3e5383fae89.png)
todo
-
namespace crypto#
Typedefs
-
using aes_t = std::vector<std::uint8_t>#
-
using bignum_t = util::safe_ptr<BIGNUM, BN_free>#
-
using bio_t = util::safe_ptr<BIO, BIO_free_all>#
-
using cipher_ctx_t = util::safe_ptr<EVP_CIPHER_CTX, EVP_CIPHER_CTX_free>#
-
using md_ctx_t = util::safe_ptr<EVP_MD_CTX, md_ctx_destroy>#
-
using pkey_ctx_t = util::safe_ptr<EVP_PKEY_CTX, EVP_PKEY_CTX_free>#
-
using pkey_t = util::safe_ptr<EVP_PKEY, EVP_PKEY_free>#
-
using sha256_t = std::array<std::uint8_t, SHA256_DIGEST_LENGTH>#
-
using x509_store_ctx_t = util::safe_ptr<X509_STORE_CTX, X509_STORE_CTX_free>#
-
using x509_store_t = util::safe_ptr<X509_STORE, X509_STORE_free>#
-
using x509_t = util::safe_ptr<X509, X509_free>#
-
class cert_chain_t#
Public Functions
-
cert_chain_t()#
-
cert_chain_t(cert_chain_t&&) noexcept = default#
-
void clear()#
-
cert_chain_t &operator=(cert_chain_t&&) noexcept = default#
-
const char *verify(x509_t::element_type *cert)#
When certificates from two or more instances of Moonlight have been added to x509_store_t, only one of them will be verified by X509_verify_cert, resulting in only a single instance of Moonlight to be able to use Sunshine
To circumvent this, x509_store_t instance will be created for each instance of the certificates.
-
cert_chain_t()#
-
struct creds_t#
-
namespace cipher#
Functions
-
constexpr std::size_t round_to_pkcs7_padded(std::size_t size)#
Variables
-
constexpr std::size_t tag_size = 16#
-
class cbc_t : public crypto::cipher::cipher_t#
Inheritence diagram for crypto::cipher::cbc_t:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="crypto::cipher::cbc_t" tooltip="crypto::cipher::cbc_t" fillcolor="#BFBFBF"]
"2" [label="crypto::cipher::cipher_t" tooltip="crypto::cipher::cipher_t"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
}](../../_images/graphviz-07c18199f0307827f2b52a8173735b44ce3ec909.png)
Collaboration diagram for crypto::cipher::cbc_t:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="util::uniq_ptr< EVP_CIPHER_CTX, EVP_CIPHER_CTX_free >" tooltip="util::uniq_ptr< EVP_CIPHER_CTX, EVP_CIPHER_CTX_free >"]
"1" [label="crypto::cipher::cbc_t" tooltip="crypto::cipher::cbc_t" fillcolor="#BFBFBF"]
"2" [label="crypto::cipher::cipher_t" tooltip="crypto::cipher::cipher_t"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"2" -> "3" [dir=forward tooltip="usage"]
}](../../_images/graphviz-f7af0a68da1267ed9aaff7cf71c6e7300c036ca0.png)
-
class cipher_t#
Inheritence diagram for crypto::cipher::cipher_t:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="crypto::cipher::ecb_t" tooltip="crypto::cipher::ecb_t"]
"4" [label="crypto::cipher::gcm_t" tooltip="crypto::cipher::gcm_t"]
"2" [label="crypto::cipher::cbc_t" tooltip="crypto::cipher::cbc_t"]
"1" [label="crypto::cipher::cipher_t" tooltip="crypto::cipher::cipher_t" fillcolor="#BFBFBF"]
"3" -> "1" [dir=forward tooltip="public-inheritance"]
"4" -> "1" [dir=forward tooltip="public-inheritance"]
"2" -> "1" [dir=forward tooltip="public-inheritance"]
}](../../_images/graphviz-110950bd21ff5aedebfd4897a6f04509dd569c52.png)
Collaboration diagram for crypto::cipher::cipher_t:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"2" [label="util::uniq_ptr< EVP_CIPHER_CTX, EVP_CIPHER_CTX_free >" tooltip="util::uniq_ptr< EVP_CIPHER_CTX, EVP_CIPHER_CTX_free >"]
"1" [label="crypto::cipher::cipher_t" tooltip="crypto::cipher::cipher_t" fillcolor="#BFBFBF"]
"1" -> "2" [dir=forward tooltip="usage"]
}](../../_images/graphviz-0f09f5dc48526cded0cabf0cfc2d8ed1dedc4dcc.png)
Subclassed by crypto::cipher::cbc_t, crypto::cipher::ecb_t, crypto::cipher::gcm_t
-
class ecb_t : public crypto::cipher::cipher_t#
Inheritence diagram for crypto::cipher::ecb_t:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="crypto::cipher::ecb_t" tooltip="crypto::cipher::ecb_t" fillcolor="#BFBFBF"]
"2" [label="crypto::cipher::cipher_t" tooltip="crypto::cipher::cipher_t"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
}](../../_images/graphviz-eafd851afc695a60626535c73890efba8a204b4f.png)
Collaboration diagram for crypto::cipher::ecb_t:
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="util::uniq_ptr< EVP_CIPHER_CTX, EVP_CIPHER_CTX_free >" tooltip="util::uniq_ptr< EVP_CIPHER_CTX, EVP_CIPHER_CTX_free >"]
"1" [label="crypto::cipher::ecb_t" tooltip="crypto::cipher::ecb_t" fillcolor="#BFBFBF"]
"2" [label="crypto::cipher::cipher_t" tooltip="crypto::cipher::cipher_t"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"2" -> "3" [dir=forward tooltip="usage"]
}](../../_images/graphviz-84ed2d89f63d0bc327d32ae4b4074ae607850468.png)
-
constexpr std::size_t round_to_pkcs7_padded(std::size_t size)#
-
using aes_t = std::vector<std::uint8_t>#
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"1" [label="crypto::cipher::gcm_t" tooltip="crypto::cipher::gcm_t" fillcolor="#BFBFBF"]
"2" [label="crypto::cipher::cipher_t" tooltip="crypto::cipher::cipher_t"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
}](../../_images/graphviz-55af4476e0c3c0c317e0017fc3972f5f11b8393b.png)
![digraph {
graph [bgcolor="#00000000"]
node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
edge [color="#1414CE"]
"3" [label="util::uniq_ptr< EVP_CIPHER_CTX, EVP_CIPHER_CTX_free >" tooltip="util::uniq_ptr< EVP_CIPHER_CTX, EVP_CIPHER_CTX_free >"]
"1" [label="crypto::cipher::gcm_t" tooltip="crypto::cipher::gcm_t" fillcolor="#BFBFBF"]
"2" [label="crypto::cipher::cipher_t" tooltip="crypto::cipher::cipher_t"]
"1" -> "2" [dir=forward tooltip="public-inheritance"]
"2" -> "3" [dir=forward tooltip="usage"]
}](../../_images/graphviz-5fc33c65d0ba8a771ddbe5d1fb2c18bde0f65cad.png)