conform crypt api detection to coding standard

This commit is contained in:
John Sebastian Peterson 2015-07-04 01:42:33 +02:00
parent e7caa2d20f
commit 30142e35ac
2 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,7 @@
#ifndef ED25519_NO_SEED
#ifdef TORRENT_WINRT
#if TORRENT_USE_CRYPTOGRAPHIC_BUFFER
#include <robuffer.h>
#include <wrl/client.h>
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<IBufferByteAccess> bufferByteAccess;
reinterpret_cast<IInspectable*>(seedBuffer)->QueryInterface(IID_PPV_ARGS(&bufferByteAccess));

View File

@ -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