Skip to content

Commit f252612

Browse files
[BCRYPTPRIMITIVES] Import from Wine-10.0
1 parent 97cc325 commit f252612

5 files changed

Lines changed: 45 additions & 0 deletions

File tree

dll/win32/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,5 +271,6 @@ add_subdirectory(xolehlp)
271271

272272
if(DLL_EXPORT_VERSION GREATER_EQUAL 0x600)
273273
add_subdirectory(avrt)
274+
add_subdirectory(bcryptprimitives)
274275
add_subdirectory(dwmapi)
275276
endif()
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
spec2def(bcryptprimitives.dll bcryptprimitives.spec ADD_IMPORTLIB)
3+
4+
list(APPEND SOURCE
5+
main.c
6+
${CMAKE_CURRENT_BINARY_DIR}/bcryptprimitives_stubs.c
7+
${CMAKE_CURRENT_BINARY_DIR}/bcryptprimitives.def)
8+
9+
add_library(bcryptprimitives MODULE ${SOURCE})
10+
set_module_type(bcryptprimitives win32dll UNICODE)
11+
12+
target_link_libraries(bcryptprimitives wine wine_dll_canunload)
13+
add_importlibs(bcryptprimitives advapi32 msvcrt kernel32 ntdll)
14+
add_cd_file(TARGET bcryptprimitives DESTINATION reactos/system32 FOR all)
15+
set_wine_module(bcryptprimitives)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@ stdcall ProcessPrng(ptr long)

dll/win32/bcryptprimitives/main.c

Lines changed: 27 additions & 0 deletions
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+
}

media/doc/WINESYNC.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ dll/win32/atl100 # Synced to WineStaging-3.3
5858
dll/win32/avifil32 # Synced to WineStaging-4.18
5959
dll/win32/avrt # Synced to Wine-9.7
6060
dll/win32/bcrypt # Synced to WineStaging-1.9.23 (+ winetest synced to 8d8936cbb6fea3cac862e059e814527f5361f48b, a.k.a 20161206-BJ)
61+
dll/win32/bcryptprimitives # Synced to Wine-10.0
6162
dll/win32/bluetoothapis # Synced to Wine-10.0
6263
dll/win32/browseui # Out of sync
6364
dll/win32/cabinet # Synced to WineStaging-4.18

0 commit comments

Comments
 (0)