diff options
| author | Per Larsson <[email protected]> | 2022-02-03 16:05:34 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2022-02-03 16:05:34 +0100 |
| commit | 18cc57792422a56bddc5797ceaa80dfe57e009b2 (patch) | |
| tree | 697c01ba75337e251a8e17bb5241fb81f99b85da /zencore/crypto.cpp | |
| parent | Minor cleanup of free functions. (diff) | |
| download | zen-18cc57792422a56bddc5797ceaa80dfe57e009b2.tar.xz zen-18cc57792422a56bddc5797ceaa80dfe57e009b2.zip | |
Enable encryption on all platforms.
Diffstat (limited to 'zencore/crypto.cpp')
| -rw-r--r-- | zencore/crypto.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/zencore/crypto.cpp b/zencore/crypto.cpp index 7fc524bf1..91315aa9a 100644 --- a/zencore/crypto.cpp +++ b/zencore/crypto.cpp @@ -18,11 +18,12 @@ namespace zen { -class NullCipher final : public SymmetricCipher +class NoOpSymmetricCipher final : public SymmetricCipher { public: - NullCipher() = default; - virtual ~NullCipher() = default; + NoOpSymmetricCipher() = default; + + virtual ~NoOpSymmetricCipher() = default; virtual bool Initialize(MemoryView, MemoryView) override final { return true; } @@ -34,12 +35,11 @@ public: }; std::unique_ptr<SymmetricCipher> -MakeNullCipher() +SymmetricCipher::CreateNoOp() { - return std::make_unique<NullCipher>(); + return std::make_unique<NoOpSymmetricCipher>(); } -#if ZEN_PLATFORM_WINDOWS class Aes final : public SymmetricCipher { public: @@ -184,13 +184,11 @@ private: }; std::unique_ptr<SymmetricCipher> -MakeAesCipher() +SymmetricCipher::CreateAes() { return std::make_unique<Aes>(); } -#endif // ZEN_PLATFORM_WINDOWS - #if ZEN_WITH_TESTS using namespace std::literals; |