• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *             Copyright Andrey Semashev 2018.
3  * Distributed under the Boost Software License, Version 1.0.
4  *    (See accompanying file LICENSE_1_0.txt or copy at
5  *          http://www.boost.org/LICENSE_1_0.txt)
6  */
7 /*!
8  * \file   bcrypt_abi.cpp
9  * \author Andrey Semashev
10  * \date   09.03.2018
11  *
12  * \brief  This file contains ABI test for bcrypt.hpp
13  */
14 
15 #include <boost/winapi/bcrypt.hpp>
16 #include <windows.h>
17 #include <wchar.h>
18 #include <boost/predef/platform/windows_uwp.h>
19 #if (BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6)
20 #include <bcrypt.h>
21 #endif
22 #include "abi_test_tools.hpp"
23 
main()24 int main()
25 {
26 #if (BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6)
27 #if BOOST_WINAPI_PARTITION_APP_SYSTEM
28 
29     BOOST_WINAPI_TEST_TYPE_SAME(BCRYPT_ALG_HANDLE);
30 
31     BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(BCryptCloseAlgorithmProvider);
32     BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(BCryptGenRandom);
33     BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(BCryptOpenAlgorithmProvider);
34 
35     BOOST_TEST(wcscmp(BCRYPT_RNG_ALGORITHM, boost::winapi::BCRYPT_RNG_ALGORITHM_) == 0);
36 
37 #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM
38 #endif // (BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6)
39 
40     return boost::report_errors();
41 }
42