diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2021-01-01 23:58:06 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2021-01-02 01:16:31 +0100 |
commit | 9881744c95737264c7cd9f13b3c70042c03584aa (patch) | |
tree | d3400963fd7884c674a622c052e23b585f3e9043 /src/Crypto/jitterentropy-base-user.h | |
parent | dc3700e8bb53bac72eb429554ef6a017ae071fde (diff) | |
download | VeraCrypt-9881744c95737264c7cd9f13b3c70042c03584aa.tar.gz VeraCrypt-9881744c95737264c7cd9f13b3c70042c03584aa.zip |
Windows: Add support for ARM64 platform (e.g. Microsoft Surface Pro X). System encryption still not implemented on ARM64
Diffstat (limited to 'src/Crypto/jitterentropy-base-user.h')
-rw-r--r-- | src/Crypto/jitterentropy-base-user.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Crypto/jitterentropy-base-user.h b/src/Crypto/jitterentropy-base-user.h index bfb3a605..3a33dcd6 100644 --- a/src/Crypto/jitterentropy-base-user.h +++ b/src/Crypto/jitterentropy-base-user.h @@ -70,7 +70,17 @@ typedef int32 ssize_t; static VC_INLINE void jent_get_nstime(uint64 *out) { +#ifdef _M_ARM64 + LARGE_INTEGER v = { 0 }; +#ifdef TC_WINDOWS_DRIVER + v = KeQueryPerformanceCounter(NULL); +#else + QueryPerformanceCounter(&v); +#endif + * out = v.QuadPart; +#else *out = __rdtsc();; +#endif } #else |