MCPcopy Create free account
hub / github.com/boostorg/filesystem / main

Function main

config/has_bcrypt.cpp:27–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include <boost/winapi/bcrypt.hpp>
26
27int main()
28{
29 unsigned char buf[16] = {};
30 boost::winapi::BCRYPT_ALG_HANDLE_ handle;
31 boost::winapi::NTSTATUS_ status = boost::winapi::BCryptOpenAlgorithmProvider(&handle, boost::winapi::BCRYPT_RNG_ALGORITHM_, NULL, 0);
32 status = boost::winapi::BCryptGenRandom(handle, reinterpret_cast< boost::winapi::PUCHAR_ >(static_cast< unsigned char* >(buf)), static_cast< boost::winapi::ULONG_ >(sizeof(buf)), 0);
33 boost::winapi::BCryptCloseAlgorithmProvider(handle, 0);
34}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected