diff --git a/include/sp/extensions/Encrypt.h b/include/sp/extensions/Encrypt.h new file mode 100644 index 0000000..b7196a0 --- /dev/null +++ b/include/sp/extensions/Encrypt.h @@ -0,0 +1,41 @@ +#pragma once + +/** + * \file Encrypt.h + * \brief File containing encrypt utilities + */ + +#include + +namespace sp { +namespace option { + +struct TlsEncrypt { + bool m_Enabled = true; +}; + +} // namespace option +} // namespace sp + +#include + +namespace sp { +namespace ssl { + +// encrypt + +// decrypt + +} // namespace ssl + +namespace io { + +template <> +class MessageEncapsulator { + public: + static DataBuffer Encapsulate(const DataBuffer& a_Data, const option::TlsEncrypt& a_Option); + static DataBuffer Decapsulate(DataBuffer& a_Data, const option::TlsEncrypt& a_Option); +}; + +} // namespace io +} // namespace sp diff --git a/src/sp/extensions/Encrypt.cpp b/src/sp/extensions/Encrypt.cpp new file mode 100644 index 0000000..6fe75f1 --- /dev/null +++ b/src/sp/extensions/Encrypt.cpp @@ -0,0 +1,3 @@ +#include + +#include \ No newline at end of file diff --git a/xmake.lua b/xmake.lua index 2012f06..1b120b4 100644 --- a/xmake.lua +++ b/xmake.lua @@ -6,9 +6,14 @@ local modules = { Compression = { Option = "zlib", Deps = {"zlib"}, - Packages = {"zlib"}, Includes = {"include/(sp/extensions/Compress.h)"}, Sources = {"src/sp/extensions/Compress.cpp"} + }, + Encryption = { + Option = "ssl", + Deps = {"openssl"}, + Includes = {"include/(sp/extensions/Encrypt.h)"}, + Sources = {"src/sp/extensions/Encrypt.cpp"} } } @@ -37,7 +42,7 @@ for name, module in table.orderpairs(modules) do for _, source in table.orderpairs(module.Sources) do add_files(source) end - for _, package in table.orderpairs(module.Packages) do + for _, package in table.orderpairs(module.Deps) do add_packages(package) end set_group("Library")