forked from premiere/premiere-libtorrent
conform crypt api detection to coding standard
This commit is contained in:
parent
e7caa2d20f
commit
30142e35ac
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue