[2/3] bcrypt: Add BCryptGenRandom stub
Bruno Jesus
00cpxxx at gmail.com
Mon Feb 3 12:24:29 CST 2014
-------------- next part --------------
---
dlls/bcrypt/bcrypt.spec | 2 +-
dlls/bcrypt/bcrypt_main.c | 8 ++++++++
include/bcrypt.h | 2 ++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
index e1ffb8a..87623f8 100644
--- a/dlls/bcrypt/bcrypt.spec
+++ b/dlls/bcrypt/bcrypt.spec
@@ -24,7 +24,7 @@
@ stub BCryptFinalizeKeyPair
@ stub BCryptFinishHash
@ stub BCryptFreeBuffer
-@ stub BCryptGenRandom
+@ stdcall BCryptGenRandom(ptr ptr long long)
@ stub BCryptGenerateKeyPair
@ stub BCryptGenerateSymmetricKey
@ stub BCryptGetFipsAlgorithmMode
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 441b3ef..f13cad1 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -50,3 +50,11 @@ NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG dwAlgOperations, ULONG *pAlgCount,
return ERROR_CALL_NOT_IMPLEMENTED;
}
+
+NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE *hAlgorithm, UCHAR *pbBuffer,
+ ULONG cbBuffer, ULONG dwFlags)
+{
+ FIXME("%p, %p, %u, %08x - stub\n", hAlgorithm, pbBuffer, cbBuffer, dwFlags);
+
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
diff --git a/include/bcrypt.h b/include/bcrypt.h
index 601f839..2872df3 100644
--- a/include/bcrypt.h
+++ b/include/bcrypt.h
@@ -47,6 +47,8 @@ typedef struct _BCRYPT_ALGORITHM_IDENTIFIER
ULONG dwFlags;
} BCRYPT_ALGORITHM_IDENTIFIER;
+typedef PVOID BCRYPT_ALG_HANDLE;
+
/* Flags for BCryptGenRandom */
#define BCRYPT_RNG_USE_ENTROPY_IN_BUFFER 0x00000001
#define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002
--
1.8.3.2
More information about the wine-patches
mailing list