Giter Site home page Giter Site logo

libbcrypt's Introduction

libbcrypt

A c++ wrapper around bcrypt password hashing

How to build this

This is a CMake based project:

git clone https://github.com/trusch/libbcrypt
cd libbcrypt
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

How to use this

Here an example how to use this wrapper class (you can find a slightly edited example in src/ subdirectory)

#include "bcrypt/BCrypt.hpp"
#include <iostream>

int main(){
	std::string password = "test";
	std::string hash = BCrypt::generateHash(password);

	std::cout << BCrypt::validatePassword(password,hash) << std::endl;
	std::cout << BCrypt::validatePassword("test1",hash) << std::endl;

	return 0;
}

build this with something like this:

g++ --std=c++11 -lbcrypt main.cpp

libbcrypt's People

Contributors

amadeus- avatar ethanmoffat avatar jondef avatar kriive avatar liamkarlmitchell avatar motz61 avatar pliablepixels avatar trusch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libbcrypt's Issues

Build successful but failed test on windows 7

I tried to build on windows 7, mingw 5.3.0, qt 5.7, with the command:

mkdir build
cd build
cmake -G"MinGW Makefiles" ../
mingw32-make

I disabled -fPIC flags and build successful.

D:\libbcrypt\build>bcrypt_test.exe
generate hash... terminate called after throwing an instance of 'std::runtime_error' what(): bcrypt: can not generate salt This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

But running the bcrypt_test fail.
I tried to find out a lot of information on stackoverflow but all the same things a bug like!

Windows MSVC with shared libraries

In Windows with Visual Studio 2019, BUILD_SHARED_LIBS option active, I receive an error when compiling because bcrypt.lib is not created. This impedes using the library in larger projects where the library should be built as shared library.

Usage errors on Windows 10

Trying to utilize this on Windows 10 and I can't get my compiler to quantify the include statement. Everytime it throws a fatal error: bcrypt/BCrypt.hpp: No such file or directory. However, I have -lbcrypt included in my compiler. Has anyone encountered this error before?

Does bcrypt need an execstack?

I cloned and downloaded bcrypt as per instructions. I wrote this sample code:

#include <iostream>
#include <bcrypt/BCrypt.hpp>

int main(){
        std::string password;

        std::cout << "Enter the password\n";
        std::getline(std::cin, password);

        BCrypt bcrypt;
        std::cout << bcrypt.generateHash(password) << "\n";
}

I compiled using g++ test.cpp -lbcrypt -Wl,-rpath=/usr/local/lib64 and it works. I then tried to incorporate bcrypt in my web app. The goal of the app is to add-users to a database. I am using bcrypt to hash the passwords. But my error_log says that

error while loading shared libraries: libbcrypt.so.1: cannot enable executable stack as shared object requires: Permission denied

If I disable SELinux, it works. But I don't want to do it. So I wanted to ask if bcrypt actually needs and executable stack? I am asking this cause one of the solutions when I googled the issue was to disable creation of executable stack for that library.

I am using fastcgi++ on Fedora 29 Workstation

Why does the example in the readme create an object when both the functions in the BCrypt class are static?

I recently observed that the code complete of my editor showed me the syntax of validatePassword and it contained the word static. I was shocked! I thought they were member functions. I opened BCrypt.hpp only to find both validatePassword and generateHash are static!

After some thought it made sense to me that those functions are static but this makes me wonder by does the readme create BCrypt object when according to my knowledge, it should be a no-op. And if there is no good reason to create objects, does it make sense to use a namespace instead of a class?

Linker Problem?

I am trying to test this lib on and keep running into this problem on compilation:

/tmp/ccM0Lvac.o: In function BCrypt::generateHash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)': main.cpp:(.text._ZN6BCrypt12generateHashERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi[_ZN6BCrypt12generateHashERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi]+0x44): undefined reference to bcrypt_gensalt'
main.cpp:(.text._ZN6BCrypt12generateHashERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi[_ZN6BCrypt12generateHashERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi]+0xb0): undefined reference to `bcrypt_hashpw'
collect2: error: ld returned 1 exit status

any idea why?
On Ubuntu 18.04 and using gcc

No longer compiling on Ubuntu 18.04

I've installed several servers using your instruction, however it's no longer working. I've removed and re-tried several times. I even tried from the Aug 8 build.

When I run the following command:
g++ --std=c++11 -lbcrypt main.cpp

I'm now getting the following error:
main.cpp:1:10: fatal error: bcrypt/BCrypt.hpp: No such file or directory
#include "bcrypt/BCrypt.hpp"

Install Logs:

cmake ..
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Configuring done
-- Generating done
-- Build files have been written to: /var/dtBuild/libbcrypt/build

make && make install && ldconfig
Scanning dependencies of target bcrypt
[ 12%] Building C object CMakeFiles/bcrypt.dir/src/bcrypt.c.o
[ 25%] Building C object CMakeFiles/bcrypt.dir/src/crypt_blowfish.c.o
[ 37%] Building C object CMakeFiles/bcrypt.dir/src/crypt_gensalt.c.o
[ 50%] Building C object CMakeFiles/bcrypt.dir/src/wrapper.c.o
[ 62%] Building ASM object CMakeFiles/bcrypt.dir/src/x86.S.o
[ 75%] Linking C shared library libbcrypt.so
[ 75%] Built target bcrypt
Scanning dependencies of target bcrypt_test
[ 87%] Building CXX object CMakeFiles/bcrypt_test.dir/src/main.cpp.o
[100%] Linking CXX executable bcrypt_test
[100%] Built target bcrypt_test
[ 75%] Built target bcrypt
[100%] Built target bcrypt_test
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libbcrypt.so.1.0.0
-- Up-to-date: /usr/local/lib/libbcrypt.so.1
-- Up-to-date: /usr/local/lib/libbcrypt.so
-- Installing: /usr/local/include/BCrypt.hpp
-- Up-to-date: /usr/local/include
-- Up-to-date: /usr/local/include/bcrypt
-- Installing: /usr/local/include/bcrypt/ow-crypt.h
-- Installing: /usr/local/include/bcrypt/bcrypt.h
-- Installing: /usr/local/include/bcrypt/crypt_blowfish.h
-- Installing: /usr/local/include/bcrypt/crypt.h
-- Installing: /usr/local/include/bcrypt/crypt_gensalt.h

Problem using [SOLVED]

I'm having problems using the library, here are some information below:

#include "bcrypt/BCrypt.hpp" Is included on file.

Function:

std::string transformToBCRYPT(std::string plainText, bool upperCase)
{
  std::string hash = BCrypt::generateHash(plainText.c_str());

	if(upperCase)
		return std::string(hash);

	return asLowerCaseString(std::string(hash));
}

Error:

/usr/bin/ld: objects/tools.o: in function `transformToBCRYPT(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, int)':
tools.cpp:(.text+0x14b4): undefined reference to `bcrypt_gensalt'
/usr/bin/ld: tools.cpp:(.text+0x14d4): undefined reference to `bcrypt_hashpw'
collect2: error: ld returned 1 exit status

How to solve:

My problem has been solved to adding flag -lbcrypt in Makefile project.

Can't build for i386

crypt_blowfish.c sets the macro BF_ASM for i386 targets, with the source project providing some assembly files. These files provide definitions presumably optimised for i386 processors, but this project doesn't include those files, so attempting a build results in:

Linking C shared library lib/libbcrypt.so
[ 80%] Built target bcrypt
Scanning dependencies of target bcrypt_test
[100%] Building CXX object CMakeFiles/bcrypt_test.dir/src/main.cpp.o
Linking CXX executable bin/bcrypt_test
lib/libbcrypt.so: undefined reference to `_BF_body_r'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/bcrypt_test] Error 1
make[1]: *** [CMakeFiles/bcrypt_test.dir/all] Error 2
make: *** [all] Error 2

Simply patching the file to unset BF_ASM seems to work, and is probably a reasonable long-term fix given the shrinking relevance of 32-bit systems (though I would like to stress that they do still exist!).

compile errors on windows

Hello,

In reference to PR #13, I'm trying to compile this on windows with the following command - cmake .. -G"Visual Studio 15 2017 Win64". I get the following results -

C:\libbcrypt\build>cmake --build . --target INSTALL --config Release
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

cl : Command line warning D9002: ignoring unknown option '-O3' [C:\libbcrypt\build\bcrypt.vcxproj]
  bcrypt.c
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\corecrt.h(212): warning C4668: '__cplusplus' is not defined as a preprocessor macro, replacing with '0'
 for '#if/#elif' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\libbcrypt\src\bcrypt.c(25): warning C4067: unexpected tokens following preprocessor directive - expected a newline [C:\libbcrypt\build\bcrypt.vcxproj]
C:\libbcrypt\src\bcrypt.c(30): warning C4464: relative include path contains '..' [C:\libbcrypt\build\bcrypt.vcxproj]
c:\libbcrypt\src\../include/bcrypt/bcrypt.h(17): warning C4005: 'BCRYPT_HASHSIZE': macro redefinition [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\libbcrypt\src\bcrypt.c(28): note: see previous definition of 'BCRYPT_HASHSIZE'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\winuser.h(6537): warning C4255: 'EnableMouseInPointerForThread': no function prototype given: converting
'()' to '(void)' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\winuser.h(14186): warning C4255: 'GetThreadDpiHostingBehavior': no function prototype given: converting '
()' to '(void)' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(250): error C2061: syntax error: identifier 'NCryptBuffer' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(250): error C2059: syntax error: ';' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(251): error C2143: syntax error: missing '{' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(251): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-in
t [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(251): warning C4218: nonstandard extension used: must specify at least a storage class or a type
 [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(252): error C2061: syntax error: identifier 'NCryptBufferDesc' [C:\libbcrypt\build\bcrypt.vcxpro
j]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(252): error C2059: syntax error: ';' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(253): error C2143: syntax error: missing '{' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(253): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-in
t [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(253): warning C4218: nonstandard extension used: must specify at least a storage class or a type
 [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1146): error C2143: syntax error: missing ')' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1146): error C2081: 'NCryptBufferDesc': name in formal parameter list illegal [C:\libbcrypt\buil
d\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1146): error C2143: syntax error: missing '{' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1146): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1147): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1147): error C2371: 'NCRYPT_KEY_HANDLE': redefinition; different basic types [C:\libbcrypt\build
\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(261): note: see declaration of 'NCRYPT_KEY_HANDLE'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1147): error C2143: syntax error: missing ';' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1147): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1148): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1148): error C2040: 'PBYTE': 'int' differs in levels of indirection from 'BYTE *' [C:\libbcrypt\
build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1148): error C2146: syntax error: missing ';' before identifier 'pbData' [C:\libbcrypt\build\bcr
ypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1148): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1149): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1149): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1149): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1149): error C2146: syntax error: missing ';' before identifier 'cbData' [C:\libbcrypt\build\bcr
ypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1149): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1150): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1150): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1150): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1150): error C2146: syntax error: missing ';' before identifier 'dwFlags' [C:\libbcrypt\build\bc
rypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1150): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1150): error C2059: syntax error: ')' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1161): error C2143: syntax error: missing ')' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1161): error C2081: 'NCryptBufferDesc': name in formal parameter list illegal [C:\libbcrypt\buil
d\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1161): error C2143: syntax error: missing '{' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1161): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1162): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1162): error C2040: 'PBYTE': 'int' differs in levels of indirection from 'BYTE *' [C:\libbcrypt\
build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1162): error C2146: syntax error: missing ';' before identifier 'pbOutput' [C:\libbcrypt\build\b
crypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1162): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1163): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1163): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1163): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1163): error C2146: syntax error: missing ';' before identifier 'cbOutput' [C:\libbcrypt\build\b
crypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1163): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1164): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1164): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1164): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1164): error C2143: syntax error: missing ';' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1164): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1165): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1165): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1165): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1165): error C2146: syntax error: missing ';' before identifier 'dwFlags' [C:\libbcrypt\build\bc
rypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1165): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1165): error C2059: syntax error: ')' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1273): error C2143: syntax error: missing ')' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1273): error C2081: 'NCryptBufferDesc': name in formal parameter list illegal [C:\libbcrypt\buil
d\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1273): error C2143: syntax error: missing '{' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1273): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1274): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1274): error C2040: 'PBYTE': 'int' differs in levels of indirection from 'BYTE *' [C:\libbcrypt\
build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1274): error C2146: syntax error: missing ';' before identifier 'pbDerivedKey' [C:\libbcrypt\bui
ld\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1274): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1275): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1275): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1275): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1275): error C2146: syntax error: missing ';' before identifier 'cbDerivedKey' [C:\libbcrypt\bui
ld\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1275): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1276): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1276): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1276): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1276): error C2143: syntax error: missing ';' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1276): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1277): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1277): warning C4142: 'ULONG': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(51): note: see declaration of 'ULONG'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1277): error C2370: 'ULONG': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(51): note: see declaration of 'ULONG'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1277): error C2146: syntax error: missing ';' before identifier 'dwFlags' [C:\libbcrypt\build\bc
rypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1277): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1277): error C2059: syntax error: ')' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1288): error C2143: syntax error: missing ')' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1288): error C2081: 'NCryptBufferDesc': name in formal parameter list illegal [C:\libbcrypt\buil
d\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1288): error C2143: syntax error: missing '{' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1288): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1289): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1289): error C2040: 'PUCHAR': 'int' differs in levels of indirection from 'UCHAR *' [C:\libbcryp
t\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1289): error C2146: syntax error: missing ';' before identifier 'pbDerivedKey' [C:\libbcrypt\bui
ld\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1289): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1290): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1290): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1290): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1290): error C2146: syntax error: missing ';' before identifier 'cbDerivedKey' [C:\libbcrypt\bui
ld\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1290): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1291): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1291): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1291): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1291): error C2143: syntax error: missing ';' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1291): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1292): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1292): warning C4142: 'ULONG': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(51): note: see declaration of 'ULONG'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1292): error C2370: 'ULONG': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(51): note: see declaration of 'ULONG'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1292): error C2146: syntax error: missing ';' before identifier 'dwFlags' [C:\libbcrypt\build\bc
rypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1292): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1292): error C2059: syntax error: ')' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1306): error C2143: syntax error: missing ')' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1306): error C2081: 'NCryptBufferDesc': name in formal parameter list illegal [C:\libbcrypt\buil
d\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1306): error C2143: syntax error: missing '{' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1306): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1307): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1307): error C2040: 'PBYTE': 'int' differs in levels of indirection from 'BYTE *' [C:\libbcrypt\
build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1307): error C2146: syntax error: missing ';' before identifier 'pbClaimBlob' [C:\libbcrypt\buil
d\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1307): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1308): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1308): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1308): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1308): error C2146: syntax error: missing ';' before identifier 'cbClaimBlob' [C:\libbcrypt\buil
d\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1308): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1309): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1309): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1309): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1309): error C2143: syntax error: missing ';' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1309): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1310): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1310): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1310): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1310): error C2146: syntax error: missing ';' before identifier 'dwFlags' [C:\libbcrypt\build\bc
rypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1310): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1310): error C2059: syntax error: ')' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1324): error C2143: syntax error: missing ')' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1324): error C2081: 'NCryptBufferDesc': name in formal parameter list illegal [C:\libbcrypt\buil
d\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1324): error C2143: syntax error: missing '{' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1324): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1325): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1325): error C2040: 'PBYTE': 'int' differs in levels of indirection from 'BYTE *' [C:\libbcrypt\
build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1325): error C2146: syntax error: missing ';' before identifier 'pbClaimBlob' [C:\libbcrypt\buil
d\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1325): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1326): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1326): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1326): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1326): error C2146: syntax error: missing ';' before identifier 'cbClaimBlob' [C:\libbcrypt\buil
d\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1326): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1327): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1327): error C2143: syntax error: missing ';' before '*' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1327): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1328): warning C4431: missing type specifier - int assumed. Note: C no longer supports default-i
nt [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1328): warning C4142: 'DWORD': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1328): error C2370: 'DWORD': redefinition; different storage class [C:\libbcrypt\build\bcrypt.vc
xproj]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared\minwindef.h(156): note: see declaration of 'DWORD'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1328): error C2146: syntax error: missing ';' before identifier 'dwFlags' [C:\libbcrypt\build\bc
rypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1328): warning C4218: nonstandard extension used: must specify at least a storage class or a typ
e [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1328): error C2059: syntax error: ')' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8446): error C2061: syntax error: identifier 'BCRYPT_KEY_HANDLE' [C:\libbcrypt\build\bcrypt.vc
xproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8447): error C2059: syntax error: '}' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8448): warning C4142: 'dwFlags': benign redefinition of type [C:\libbcrypt\build\bcrypt.vcxpro
j]
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\ncrypt.h(1328): note: see declaration of 'dwFlags'
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8455): error C2059: syntax error: '}' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8521): error C2146: syntax error: missing ')' before identifier 'pContentEncryptInfo' [C:\libb
crypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8521): error C2061: syntax error: identifier 'pContentEncryptInfo' [C:\libbcrypt\build\bcrypt.
vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8521): error C2059: syntax error: ';' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8521): error C2059: syntax error: ',' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8524): error C2059: syntax error: ')' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8579): error C2146: syntax error: missing ')' before identifier 'pContentEncryptInfo' [C:\libb
crypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8579): error C2061: syntax error: identifier 'pContentEncryptInfo' [C:\libbcrypt\build\bcrypt.
vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8579): error C2059: syntax error: ';' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8579): error C2059: syntax error: ',' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8584): error C2059: syntax error: ')' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8686): error C2146: syntax error: missing ')' before identifier 'pContentEncryptInfo' [C:\libb
crypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8686): error C2061: syntax error: identifier 'pContentEncryptInfo' [C:\libbcrypt\build\bcrypt.
vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8686): error C2059: syntax error: ';' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8686): error C2059: syntax error: ',' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8691): error C2059: syntax error: ')' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8747): error C2146: syntax error: missing ')' before identifier 'pContentEncryptInfo' [C:\libb
crypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8747): error C2061: syntax error: identifier 'pContentEncryptInfo' [C:\libbcrypt\build\bcrypt.
vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8747): error C2059: syntax error: ';' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8747): error C2059: syntax error: ',' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8752): error C2059: syntax error: ')' [C:\libbcrypt\build\bcrypt.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8827): error C2061: syntax error: identifier 'BCRYPT_KEY_HANDLE' [C:\libbcrypt\build\bcrypt.vc
xproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\wincrypt.h(8827): fatal error C1003: error count exceeds 100; stopping compilation [C:\libbcrypt\build\bc
rypt.vcxproj]

BCRYPT_HASHSIZE Windows

Under bcrypt.c BCRYPT_HASHSIZE is 60. But then the function crypto_rn is called. That is transmitted in BF_Crypt function as size parameter (crypt_blowfish.c). In this function is required that size is bigger as 60
if (size < 7 + 22 + 31 + 1) {
__set_errno(ERANGE);
return NULL;
}
Hence an error by hash generation. It seems to work with a hash size of 64.

CMakeLists.txt not cross-compile-friendly

The install directives have hardcoded absolute installation paths, so the CMAKE_INSTALL_PREFIX macro has no effect.

This makes cross-compiling difficult (particularly as I don't know what a patch would look like).

Error making on windows

I want to make on windows but this happens: CMake Error at CMakeLists.txt:41 (install):
install Library TARGETS given no DESTINATION!
can you give me the built file or fix this issue?

Compiling on Ubuntu 16.04 LTS

So I've managed to install this and get it working on my MacBook Pro just fine, however I now need to deploy the application onto an Ubuntu server and am getting a few issues trying to compile.

I followed the instructions in the readme, the same as I did on my Mac. Here is the output.

/tmp/ccSHG97n.o: In function `BCrypt::generateHash(std::__cxx11::basic_string<char, std::char_traits<char>, std::al
locator<char> > const&, int)':
main.cpp:(.text._ZN6BCrypt12generateHashERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi[_ZN6BCrypt12genera
teHashERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi]+0x44): undefined reference to `bcrypt_gensalt'
main.cpp:(.text._ZN6BCrypt12generateHashERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi[_ZN6BCrypt12genera
teHashERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi]+0xa7): undefined reference to `bcrypt_hashpw'
/tmp/ccSHG97n.o: In function `BCrypt::validatePassword(std::__cxx11::basic_string<char, std::char_traits<char>, std
::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
':
main.cpp:(.text._ZN6BCrypt16validatePasswordERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_[_ZN6BCrypt16
validatePasswordERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_]+0x33): undefined reference to `bcrypt_c
heckpw'
collect2: error: ld returned 1 exit status

How to use this lib on windows?

I compile this lib and run test on windows, I get std::runtime_error:
generate hash...terminate called after throwing an instance of 'std::runtime_error'
what(): bcrypt: can not generate salt
My compiler is MINGW 5.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.