From 30142e35ac2634f8f46803ba9ebdc0d8b7c6d323 Mon Sep 17 00:00:00 2001 From: John Sebastian Peterson Date: Sat, 4 Jul 2015 01:42:33 +0200 Subject: [PATCH] conform crypt api detection to coding standard --- ed25519/src/seed.cpp | 4 ++-- include/libtorrent/config.hpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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