diff --git a/ed25519/src/seed.cpp b/ed25519/src/seed.cpp index e6478a293..63244cbbd 100644 --- a/ed25519/src/seed.cpp +++ b/ed25519/src/seed.cpp @@ -8,7 +8,7 @@ #ifndef ED25519_NO_SEED -#ifdef TORRENT_WINRT +#if TORRENT_USE_CRYPTOGRAPHIC_BUFFER #include #include using namespace Windows::Security::Cryptography; @@ -22,7 +22,7 @@ using namespace Microsoft::WRL; #endif void ed25519_create_seed(unsigned char *seed) { -#ifdef TORRENT_WINRT +#if TORRENT_USE_CRYPTOGRAPHIC_BUFFER IBuffer^ seedBuffer = CryptographicBuffer::GenerateRandom(32); ComPtr bufferByteAccess; reinterpret_cast(seedBuffer)->QueryInterface(IID_PPV_ARGS(&bufferByteAccess)); diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index 78ec62660..d59c6192b 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -280,6 +280,7 @@ POSSIBILITY OF SUCH DAMAGE. # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \ && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # define TORRENT_WINRT +# define TORRENT_USE_CRYPTOGRAPHIC_BUFFER 1 # endif #endif