Sunday, April 20, 2014

Bcrypt under C/C++ with Botan and password hashing

Recently I have came across the need of a simple encryption mechanism for C++, and after a few trial and error, I decided to use Botan. However under windows 7, compiling it was not as straight forward as in other environments due to lack of built in "make", or other standard commands. With the programming environment I am under (mingw-32), there are few things worth noting.

Here is the official procedure to build it, however there are something missing under windows with mingw-32 environment.

  1. You need python for the Botan configuration script. 
  2. You need mingw32-make.
  3. You need MSYG.
  4. Download Botan.

Make sure you set the environment path for the bin directory of each above mentioned tools, then open a command window run.


python configure.py --cpu=i686 --cc=gcc

that will configure the make file for the build environment.

Then run


mingw32-make

that's it.





No comments:

Post a Comment