bcrypt: Added BCryptGenRandom stub (try3)
Jascha Knack
jascha.knack at smail.inf.h-brs.de
Sun Jan 5 09:01:02 CST 2014
>From c4a53d6861dc392316442470efe8484a507c3b49 Mon Sep 17 00:00:00 2001
From: Jascha Knack <jascha.knack at smail.inf.h-brs.de>
Date: Sun, 5 Jan 2014 15:55:13 +0100
Subject: bcrypt: Added BCryptGenRandom stub
---
dlls/bcrypt/bcrypt.spec | 2 +-
dlls/bcrypt/bcrypt_main.c | 13 ++++++++++++-
include/bcrypt.h | 4 ++++
3 files changed, 17 insertions(+), 2 deletions(-)
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..9813361 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -18,9 +18,12 @@
*/
#include "config.h"
+
#include "wine/port.h"
#include "wine/debug.h"
+#include "ntstatus.h"
+
#include "winbase.h"
#include "bcrypt.h"
@@ -48,5 +51,13 @@ NTSTATUS WINAPI BCryptEnumAlgorithms(ULONG dwAlgOperations, ULONG *pAlgCount,
*ppAlgList=NULL;
*pAlgCount=0;
- return ERROR_CALL_NOT_IMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS WINAPI BCryptGenRandom(BCRYPT_ALG_HANDLE hAlgorithm, PUCHAR pbBuffer,
+ ULONG cbBuffer, ULONG dwFlags)
+{
+ FIXME("%p, %p, %08x, %08x - stub\n", hAlgorithm, pbBuffer, cbBuffer, dwFlags);
+
+ return STATUS_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