Skip to content

Commit 83d4075

Browse files
ChrisDentonjulliard
authored andcommitted
bcryptprimitives: ProcessPrng stub.
ProcessPrng is the only publicly documented function exported by bcryptprimitives. This stub simply forwards it to RtlGenRandom in advapi32.
1 parent cdf325c commit 83d4075

File tree

5 files changed

+36
-0
lines changed

5 files changed

+36
-0
lines changed

configure

+2
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,7 @@ enable_avicap32
986986
enable_avifil32
987987
enable_avrt
988988
enable_bcrypt
989+
enable_bcryptprimitives
989990
enable_bluetoothapis
990991
enable_browseui
991992
enable_bthprops_cpl
@@ -21194,6 +21195,7 @@ wine_fn_config_makefile dlls/avifile.dll16 enable_win16
2119421195
wine_fn_config_makefile dlls/avrt enable_avrt
2119521196
wine_fn_config_makefile dlls/bcrypt enable_bcrypt
2119621197
wine_fn_config_makefile dlls/bcrypt/tests enable_tests
21198+
wine_fn_config_makefile dlls/bcryptprimitives enable_bcryptprimitives
2119721199
wine_fn_config_makefile dlls/bluetoothapis enable_bluetoothapis
2119821200
wine_fn_config_makefile dlls/browseui enable_browseui
2119921201
wine_fn_config_makefile dlls/browseui/tests enable_tests

configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -2389,6 +2389,7 @@ WINE_CONFIG_MAKEFILE(dlls/avifile.dll16,enable_win16)
23892389
WINE_CONFIG_MAKEFILE(dlls/avrt)
23902390
WINE_CONFIG_MAKEFILE(dlls/bcrypt)
23912391
WINE_CONFIG_MAKEFILE(dlls/bcrypt/tests)
2392+
WINE_CONFIG_MAKEFILE(dlls/bcryptprimitives)
23922393
WINE_CONFIG_MAKEFILE(dlls/bluetoothapis)
23932394
WINE_CONFIG_MAKEFILE(dlls/browseui)
23942395
WINE_CONFIG_MAKEFILE(dlls/browseui/tests)

dlls/bcryptprimitives/Makefile.in

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
MODULE = bcryptprimitives.dll
2+
IMPORTS = advapi32
3+
4+
C_SRCS = \
5+
main.c
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@ stdcall ProcessPrng(ptr long)

dlls/bcryptprimitives/main.c

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2023 Christopher S. Denton
3+
*
4+
* This library is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU Lesser General Public
6+
* License as published by the Free Software Foundation; either
7+
* version 2.1 of the License, or (at your option) any later version.
8+
*
9+
* This library is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with this library; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17+
*/
18+
19+
#include <stdarg.h>
20+
#include "windef.h"
21+
#include "winbase.h"
22+
#include "ntsecapi.h"
23+
24+
BOOL WINAPI ProcessPrng(BYTE *data, SIZE_T size)
25+
{
26+
return RtlGenRandom(data, size);
27+
}

0 commit comments

Comments
 (0)