| 25 | #include <boost/winapi/bcrypt.hpp> |
| 26 | |
| 27 | int 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected