1
0
mirror of https://github.com/PurpleI2P/Boost-for-Android-Prebuilt synced 2025-01-10 06:48:10 +00:00
Boost-for-Android-Prebuilt/boost-1_72_0/include/boost/winapi/bcrypt.hpp
r4sas 93de5720b8
add boost 1.72.0
Signed-off-by: r4sas <r4sas@i2pmail.org>
2020-02-29 22:43:48 +00:00

84 lines
1.9 KiB
C++

/*
* Copyright 2017 James E. King, III
*
* Distributed under the Boost Software License, Version 1.0.
* See http://www.boost.org/LICENSE_1_0.txt
*/
#ifndef BOOST_WINAPI_BCRYPT_HPP_INCLUDED_
#define BOOST_WINAPI_BCRYPT_HPP_INCLUDED_
#include <boost/winapi/basic_types.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#if BOOST_WINAPI_PARTITION_APP_SYSTEM
#if defined(BOOST_USE_WINDOWS_H)
#include <bcrypt.h>
namespace boost { namespace winapi {
typedef ::BCRYPT_ALG_HANDLE BCRYPT_ALG_HANDLE_;
}}
#else // defined(BOOST_USE_WINDOWS_H)
namespace boost { namespace winapi {
typedef PVOID_ BCRYPT_ALG_HANDLE_;
}}
extern "C" {
boost::winapi::NTSTATUS_ BOOST_WINAPI_WINAPI_CC
BCryptCloseAlgorithmProvider(
boost::winapi::BCRYPT_ALG_HANDLE_ hAlgorithm,
boost::winapi::ULONG_ dwFlags
);
boost::winapi::NTSTATUS_ BOOST_WINAPI_WINAPI_CC
BCryptGenRandom(
boost::winapi::BCRYPT_ALG_HANDLE_ hAlgorithm,
boost::winapi::PUCHAR_ pbBuffer,
boost::winapi::ULONG_ cbBuffer,
boost::winapi::ULONG_ dwFlags
);
boost::winapi::NTSTATUS_ BOOST_WINAPI_WINAPI_CC
BCryptOpenAlgorithmProvider(
boost::winapi::BCRYPT_ALG_HANDLE_ *phAlgorithm,
boost::winapi::LPCWSTR_ pszAlgId,
boost::winapi::LPCWSTR_ pszImplementation,
boost::winapi::DWORD_ dwFlags
);
} // extern "C"
#endif // defined(BOOST_USE_WINDOWS_H)
namespace boost {
namespace winapi {
#if defined(BOOST_USE_WINDOWS_H)
const WCHAR_ BCRYPT_RNG_ALGORITHM_[] = BCRYPT_RNG_ALGORITHM;
#else
const WCHAR_ BCRYPT_RNG_ALGORITHM_[] = L"RNG";
#endif
using ::BCryptCloseAlgorithmProvider;
using ::BCryptGenRandom;
using ::BCryptOpenAlgorithmProvider;
} // winapi
} // boost
#endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
#endif // BOOST_WINAPI_BCRYPT_HPP_INCLUDED_