diff options
author | lealem47 <60322859+lealem47@users.noreply.github.com> | 2023-11-12 16:51:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 00:51:31 +0100 |
commit | 9247ce1bb90c44d19a0069fadb12c0c480ac9b4f (patch) | |
tree | 66fb4728d502759271d03eba59d51c1a129b2ffb /src/Main/Forms/BenchmarkDialog.cpp | |
parent | 458be85f84a097aa829658c50ce41d82791fb6a8 (diff) | |
download | VeraCrypt-9247ce1bb90c44d19a0069fadb12c0c480ac9b4f.tar.gz VeraCrypt-9247ce1bb90c44d19a0069fadb12c0c480ac9b4f.zip |
wolfCrypt as crypto backend for VeraCrypt (#1227)
* wolfCrypt as crypto backend for VeraCrypt
* Refactor to use EncryptionModeWolfCryptXTS class
Diffstat (limited to 'src/Main/Forms/BenchmarkDialog.cpp')
-rw-r--r-- | src/Main/Forms/BenchmarkDialog.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Main/Forms/BenchmarkDialog.cpp b/src/Main/Forms/BenchmarkDialog.cpp index 7b0209ff..da2fe43b 100644 --- a/src/Main/Forms/BenchmarkDialog.cpp +++ b/src/Main/Forms/BenchmarkDialog.cpp @@ -12,6 +12,9 @@ #include "System.h" #include "Volume/EncryptionModeXTS.h" +#ifdef WOLFCRYPT_BACKEND +#include "Volume/EncryptionModeWolfCryptXTS.h" +#endif #include "Main/GraphicUserInterface.h" #include "BenchmarkDialog.h" @@ -209,9 +212,13 @@ namespace VeraCrypt Buffer key (ea->GetKeySize()); ea->SetKey (key); - + #ifdef WOLFCRYPT_BACKEND + shared_ptr <EncryptionMode> xts (new EncryptionModeWolfCryptXTS); + ea->SetKeyXTS (key); + #else shared_ptr <EncryptionMode> xts (new EncryptionModeXTS); - xts->SetKey (key); + #endif + xts->SetKey (key); ea->SetMode (xts); wxLongLong startTime = wxGetLocalTimeMillis(); |