mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:54:05 +00:00
cryptowinrt: Implement GenerateRandomNumber().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
09cb9cd1c6
commit
5e0acc095d
|
@ -1,5 +1,5 @@
|
||||||
MODULE = cryptowinrt.dll
|
MODULE = cryptowinrt.dll
|
||||||
IMPORTS = combase uuid
|
IMPORTS = combase bcrypt uuid
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
main.c
|
main.c
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include "initguid.h"
|
#include "initguid.h"
|
||||||
#include "activation.h"
|
#include "activation.h"
|
||||||
|
|
||||||
|
#include "bcrypt.h"
|
||||||
|
|
||||||
#define WIDL_using_Windows_Foundation
|
#define WIDL_using_Windows_Foundation
|
||||||
#define WIDL_using_Windows_Foundation_Collections
|
#define WIDL_using_Windows_Foundation_Collections
|
||||||
#include "windows.foundation.h"
|
#include "windows.foundation.h"
|
||||||
|
@ -214,9 +216,10 @@ static HRESULT STDMETHODCALLTYPE cryptobuffer_statics_GenerateRandom(
|
||||||
static HRESULT STDMETHODCALLTYPE cryptobuffer_statics_GenerateRandomNumber(
|
static HRESULT STDMETHODCALLTYPE cryptobuffer_statics_GenerateRandomNumber(
|
||||||
ICryptographicBufferStatics *iface, UINT32 *value)
|
ICryptographicBufferStatics *iface, UINT32 *value)
|
||||||
{
|
{
|
||||||
FIXME("iface %p, value %p stub!\n", iface, value);
|
TRACE("iface %p, value %p.\n", iface, value);
|
||||||
|
|
||||||
return E_NOTIMPL;
|
BCryptGenRandom(NULL, (UCHAR *)value, sizeof(*value), BCRYPT_USE_SYSTEM_PREFERRED_RNG);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE cryptobuffer_statics_CreateFromByteArray(
|
static HRESULT STDMETHODCALLTYPE cryptobuffer_statics_CreateFromByteArray(
|
||||||
|
|
Loading…
Reference in a new issue