Skip to content

Commit

Permalink
bcryptprimitives: ProcessPrng stub.
Browse files Browse the repository at this point in the history
ProcessPrng is the only publicly documented function exported by bcryptprimitives. This stub simply forwards it to RtlGenRandom in advapi32.
  • Loading branch information
ChrisDenton authored and julliard committed Jul 10, 2023
1 parent cdf325c commit 83d4075
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ enable_avicap32
enable_avifil32
enable_avrt
enable_bcrypt
enable_bcryptprimitives
enable_bluetoothapis
enable_browseui
enable_bthprops_cpl
Expand Down Expand Up @@ -21194,6 +21195,7 @@ wine_fn_config_makefile dlls/avifile.dll16 enable_win16
wine_fn_config_makefile dlls/avrt enable_avrt
wine_fn_config_makefile dlls/bcrypt enable_bcrypt
wine_fn_config_makefile dlls/bcrypt/tests enable_tests
wine_fn_config_makefile dlls/bcryptprimitives enable_bcryptprimitives
wine_fn_config_makefile dlls/bluetoothapis enable_bluetoothapis
wine_fn_config_makefile dlls/browseui enable_browseui
wine_fn_config_makefile dlls/browseui/tests enable_tests
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2389,6 +2389,7 @@ WINE_CONFIG_MAKEFILE(dlls/avifile.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/avrt)
WINE_CONFIG_MAKEFILE(dlls/bcrypt)
WINE_CONFIG_MAKEFILE(dlls/bcrypt/tests)
WINE_CONFIG_MAKEFILE(dlls/bcryptprimitives)
WINE_CONFIG_MAKEFILE(dlls/bluetoothapis)
WINE_CONFIG_MAKEFILE(dlls/browseui)
WINE_CONFIG_MAKEFILE(dlls/browseui/tests)
Expand Down
5 changes: 5 additions & 0 deletions dlls/bcryptprimitives/Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MODULE = bcryptprimitives.dll
IMPORTS = advapi32

C_SRCS = \
main.c
1 change: 1 addition & 0 deletions dlls/bcryptprimitives/bcryptprimitives.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@ stdcall ProcessPrng(ptr long)
27 changes: 27 additions & 0 deletions dlls/bcryptprimitives/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2023 Christopher S. Denton
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/

#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "ntsecapi.h"

BOOL WINAPI ProcessPrng(BYTE *data, SIZE_T size)
{
return RtlGenRandom(data, size);
}

0 comments on commit 83d4075

Please sign in to comment.