bcrypt: Added BCryptGenRandom stub

Jascha Knack jascha.knack at smail.inf.h-brs.de
Sat Jan 4 09:46:18 CST 2014


---
 dlls/bcrypt/bcrypt.spec   | 2 +-
 dlls/bcrypt/bcrypt_main.c | 8 ++++++++
 include/bcrypt.h          | 4 ++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/dlls/bcrypt/bcrypt.spec b/dlls/bcrypt/bcrypt.spec
index e1ffb8a..7508135 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(long long long long)
 @ stub BCryptGenerateKeyPair
 @ stub BCryptGenerateSymmetricKey
 @ stub BCryptGetFipsAlgorithmMode
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index 441b3ef..4bd06b4 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, PUCHAR
pbBuffer,
+                                ULONG cbBuffer, ULONG dwFlags)
+{
+    FIXME("%08x, %08x, %08x, %08x - stub\n", hAlgorithm, pbBuffer,
cbBuffer, dwFlags);
+
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
diff --git a/include/bcrypt.h b/include/bcrypt.h
index 43d1f94..d93bc44 100644
--- a/include/bcrypt.h
+++ b/include/bcrypt.h
@@ -47,4 +47,8 @@ typedef struct _BCRYPT_ALGORITHM_IDENTIFIER
     ULONG  dwFlags;
 } BCRYPT_ALGORITHM_IDENTIFIER;

+typedef PVOID BCRYPT_ALG_HANDLE;
+
+NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, ULONG);
+
 #endif  /* __WINE_BCRYPT_H */
-- 
1.8.4.2




More information about the wine-patches mailing list