diff --git a/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/crypto_scrypt-common.c b/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/crypto_scrypt-common.c index 0f43c944..9e3156ca 100644 --- a/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/crypto_scrypt-common.c +++ b/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/crypto_scrypt-common.c @@ -153,7 +153,7 @@ escrypt_r(escrypt_local_t * local, const uint8_t * passwd, size_t passwdlen, if (need > buflen || need < saltlen) { return NULL; } -#ifdef HAVE_EMMINTRIN_H +#if defined(HAVE_EMMINTRIN_H) || defined(_MSC_VER) escrypt_kdf = sodium_runtime_has_sse2() ? escrypt_kdf_sse : escrypt_kdf_nosse; #else @@ -234,7 +234,7 @@ crypto_scrypt_compat(const uint8_t * passwd, size_t passwdlen, if (escrypt_init_local(&local)) { return -1; } -#ifdef HAVE_EMMINTRIN_H +#if defined(HAVE_EMMINTRIN_H) || defined(_MSC_VER) escrypt_kdf = sodium_runtime_has_sse2() ? escrypt_kdf_sse : escrypt_kdf_nosse; #else diff --git a/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256_sse.c b/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256_sse.c index b734acf1..d3da6d06 100644 --- a/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256_sse.c +++ b/src/libsodium/crypto_pwhash/scryptxsalsa208sha256/sse/pwhash_scryptxsalsa208sha256_sse.c @@ -28,7 +28,7 @@ * online backup system. */ -#ifdef HAVE_EMMINTRIN_H +#if defined(HAVE_EMMINTRIN_H) || defined(_MSC_VER) #pragma GCC target("sse2") #include #if defined(__XOP__) && defined(DISABLED)