Trying to install py-bcrypt on win7. Python is 64bit. First error unable to find vcvarsall.bat. Googled a bit learned that i needed to install mingw. installed it now this
C:\tools\python_modules\py-bcrypt-0.2>python setup.py build -c mingw32
running build
running build_py
running build_ext
building 'bcrypt._bcrypt' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\Python27\include -Ic:\Python27\PC -c bcrypt/bcrypt_python.c -o b
d\temp.win-amd64-2.7\Release\bcrypt\bcrypt_python.o
bcrypt/bcrypt_python.c:29:26: error: expected declaration specifiers or '...' before 'u_int8_t'
bcrypt/bcrypt_python.c:29:38: error: expected declaration specifiers or '...' before 'u_int16_t'
bcrypt/bcrypt_python.c:29:49: error: expected declaration specifiers or '...' before 'u_int8_t'
bcrypt/bcrypt_python.c: In function 'bcrypt_encode_salt':
bcrypt/bcrypt_python.c:56:2: error: too many arguments to function 'encode_salt'
bcrypt/bcrypt_python.c:29:6: note: declared here
error: command 'gcc' failed with exit status 1
no idea what to do next. guess i'll just not use bcrypt and try something else. Any other suggestions?
There is a compiled version of py-bcrypt for windows. You can visit https://bitbucket.org/alexandrul/py-bcrypt/downloads to download the .exe file and install.
I've looked at the bcrypt source, and can't figure out why you're getting the error you are (don't have a Windows system at hand to test on right now). Though looking at the pybcrypt issue tracker it looks like it has other Windows compilation problems, so it's probably not just you. At a guess though, adding "--std=C99" to the gcc arguments via extra_compile_args might fix at least some of the errors.
Aside from that, there are a couple of alternatives -
Bcryptor is another C-extension bcrypt implementation which may compile for your system.
Passlib is a general password hashing library. While it relies on bcryptor/pybcrypt for bcrypt support, it has builtin support for a number of other password hashes that may work for you - such as SHA512-Crypt or PBKDF2-HMAC-SHA512
Cryptacular is another general password hashing library. On Windows, it provides both BCrypt and PBKDF2-HMAC-SHA512 password hashes. (I'd link straight to those, but the documentation won't quite let me).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With