mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Common: Add Random utilities
This makes it easier to generate random numbers or fill a buffer with random data in a cryptographically secure way. This also replaces existing usages of RNG functions in the codebase: * <random> is pretty hard to use correctly, and std::random_device does not give enough guarantees about its results (it's implementation-defined, non cryptographically secure and could be deterministic on some platforms). Doing things correctly is error prone and verbose. * rand() is terrible and should not be used especially in crypto code.
This commit is contained in:
@ -34,6 +34,7 @@ add_library(common
|
||||
PerformanceCounter.cpp
|
||||
Profiler.cpp
|
||||
QoSSession.cpp
|
||||
Random.cpp
|
||||
SDCardUtil.cpp
|
||||
SettingsHandler.cpp
|
||||
StringUtil.cpp
|
||||
@ -156,6 +157,7 @@ endif()
|
||||
if(UNIX)
|
||||
# Posix networking code needs to be fixed for Windows
|
||||
add_executable(traversal_server TraversalServer.cpp)
|
||||
target_link_libraries(traversal_server PRIVATE common)
|
||||
if(SYSTEMD_FOUND)
|
||||
target_link_libraries(traversal_server ${SYSTEMD_LIBRARIES})
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user