tpherndon / py-bcrypt Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/py-bcrypt
License: Other
Automatically exported from code.google.com/p/py-bcrypt
License: Other
Do you can provide a conda binstar or a wheel file to install easy on windows
32 bits?
with pip install I receive a error with vcvarsall.bat (unable to find that).
Configure the microsoft visual c++ compiler is always a problem :S
Or if you have a easy steps do configure that .. it will be great .. I've tried
this before .. helped with a lot of forums .. but always with no success.
but a wheel file or a conda binstar that work on windows 32 with python 3.4
will be better :)
thank you for your attention.
My best.
Ivan
What steps will reproduce the problem?
1. pip install py-bcrypt
What is the expected output? What do you see instead?
install success!
What version of the product are you using? On what operating system?
windows xp 32 bits
Please provide any additional information below.
python3.4
Original issue reported on code.google.com by [email protected]
on 22 Jul 2015 at 3:39
While compiling on Windows7 using Visual Studio 2008 (MinGW was throwing me too
many errors), I had to change the calls to bzero() in bcrypt_python.c to
memset() since bzero isn't provided in the Visual Studio 2008 linked libraries.
Original issue reported on code.google.com by [email protected]
on 31 Mar 2011 at 5:55
It would be really nice to have Python 3 support... as far I can tell, none of
the bcrypt C extensions for python support Python 3 yet.
Attached is an hg patch which should enable pybcrypt to be built for Python 3.
It makes a few changes here and there (which I tried to document), I hope it's
useful.
Original issue reported on code.google.com by [email protected]
on 2 Mar 2012 at 5:47
Attachments:
Trying to use sudo pip install bcrypt on Mac OS X with XCode 5.1+ you get the
following error:
clang: error: unknown argument: '-mno-fused-madd'
[-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in
the future
I've tried the version on PyPI and the tip of this repo. Both have the issue.
Original issue reported on code.google.com by [email protected]
on 19 May 2014 at 9:47
What steps will reproduce the problem?
1. wget http://py-bcrypt.googlecode.com/files/py-bcrypt-0.4.tar.gz
2. tar xzvf py-bcrypt-0.4.tar.gz && cd py-bcrypt-0.4
3. python setup.py build && python setup.py install
What is the expected output? What do you see instead?
Expected? Clean Build and Install.
sudo python setup.py build && python setup.py install
running build
running build_py
running build_ext
building 'bcrypt._bcrypt' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c bcrypt/bcrypt.c -o
build/temp.linux-x86_64-2.7/bcrypt/bcrypt.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c bcrypt/bcrypt_pbkdf.c -o
build/temp.linux-x86_64-2.7/bcrypt/bcrypt_pbkdf.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c bcrypt/bcrypt_python.c -o
build/temp.linux-x86_64-2.7/bcrypt/bcrypt_python.o
bcrypt/bcrypt_python.c:18:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
What version of the product are you using? On what operating system?
*Clean Debian 7.5 Copy in a VM
*Debian 7 on 2 different KVM Servers
*Python2.7 (Clean Debian 7.5 Copy and Debian 7 Server), Python3.* Debian 7
Server
*bcrypt-0.4 on all 3 servers (see the command above)
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Jun 2014 at 10:21
Hello!
I have nothing to do with python, but stumbled over this code.
The pybc_bcrypt function is not threadsafe, as it uses a static buffer
('encrypted') as the returnvalue.
As a consequence I think that the
Py_BEGIN_ALLOW_THREADS;
ret = pybc_bcrypt(password_copy, salt_copy);
Py_END_ALLOW_THREADS;
code can produce invalid results when called from multiple threads.
Best solution should be to pass the result buffer as an additional parameter.
Best regards
Sönke
Original issue reported on code.google.com by [email protected]
on 15 Jan 2013 at 12:02
What steps will reproduce the problem?
I understand that py-bcrypt might not have been intended to be compiled under
windows with cygwin. However, there are people who might still go ahead and do
it and run into issues. I had some problem finding the cause and the fix and
wanted to share it in case someone else runs into it.
1. Compile and install py-bcrypt on Windows 7 using cygwin and gcc. I have
personally seen this happen on Windows 7, and it reportedly happens on Vista as
well.
You will also need to add these lines to every .c/.h file in py-bcrypt to
compile under cygwin...
typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned int u_int32_t;
2. Run this simple test program
import bcrypt
password = 'my secret password'
# next line crashes on Windows Vista / 7
hashed = bcrypt.hashpw(password, bcrypt.gensalt())
# next line should return True
print bcrypt.hashpw('my secret password', hashed) == hashed
3. Crash!!
What is the expected output? What do you see instead?
Expected is the output 'True'. Program is killed prematurely.
What version of the product are you using? On what operating system?
py-bcrypt 0.2. Windows 7
Please provide any additional information below.
The problem is with strdup and free using 2 completely different methods for
allocating and deallocating memory. The crash happens when we reach free.
bcrypt_python.c -> bcrypt_hashpw -> free(password_copy)
The problem is that cygwin / gcc links strdup with msvcrt.dll and free is
linked with msvcr71.dll. These 2 are not supposed to work together. The fix is
to either change the links in cygwin / gcc, or change the code.
I replaced the strdup with malloc and strcpy which seems to work fine.
Original issue reported on code.google.com by [email protected]
on 31 Oct 2011 at 11:10
What steps will reproduce the problem?
1. ~/pydistutils.cfg has compiler = mingw32 in [build]
2. pip install py-bcrypt
3. python test\test.py
What is the expected output? What do you see instead?
Clean install.
Compile errors for u_int8_t. After fixing those segfaults calling hashpw.
What version of the product are you using? On what operating system?
py-bcrypt 0.2 on Windows 7. MinGW is gcc 4.6.2.
Please provide any additional information below.
This supersedes issue 9 as the patches are different.
The three attached patches address a number of problems.
1. u_int8_t, etc. are not standard C.
2. strdup on Windows is deprecated since VS2005, using _strdup instead.
3. Explicit cast added calling encode_salt.
4. memset to zero password and salt copies (duplicate of other patches, more
portable than bzero).
This is only tested on mingw32 but the ifdefs should be good for other
platforms.
Original issue reported on code.google.com by [email protected]
on 20 May 2013 at 10:00
Attachments:
What steps will reproduce the problem?
1. ~/pydistutils.cfg has compiler = mingw32 in [build]
2. pip install py-bcrypt
3. python test\test.py
What is the expected output? What do you see instead?
Clean install.
Compile errors for u_int8_t. After fixing those segfaults calling hashpw.
What version of the product are you using? On what operating system?
py-bcrypt 0.2 on Windows 7. MinGW is gcc 4.6.2.
Please provide any additional information below.
The two attached patches address a number of problems.
1. u_int8_t, etc. are not standard C.
2. strdup on Windows is deprecated since VS2005, using _strdup instead.
3. Explicit cast added calling encode_salt.
4. Move declarations to start of block.
5. memset to zero password and salt copies (duplicate of other patches).
This is only tested on mingw32 but the ifdefs should be good for other
platforms.
Original issue reported on code.google.com by [email protected]
on 11 Jun 2012 at 11:51
Attachments:
Moved #include <stdint.h> out of the if statement because it doesn't compile on
Win32.
Original issue reported on code.google.com by [email protected]
on 26 Mar 2014 at 1:18
Attachments:
This patch adds the Python 3 markers to the py-bcrypt project
page on PyPI.
So, services like https://caniusepython3.com/ will not mark
py-bcrypt as "not have Python 3 support".
See https://caniusepython3.com/check/86b76f58-2d76-4790-a1e5-154cce170a4d
for example.
You can also upload the PKG_INFO file to update the metadata on PyPI via
the web interface.
Original issue reported on code.google.com by berker.peksag
on 5 Mar 2014 at 12:07
Attachments:
What is the expected output? What do you see instead?
Collecting py-bcrypt
Using cached py-bcrypt-0.4.tar.gz
Installing collected packages: py-bcrypt
Running setup.py install for py-bcrypt
building 'bcrypt._bcrypt' extension
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt.obj
bcrypt.c
bcrypt/bcrypt.c(139) : warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(363) : see declaration of '_snprintf'
bcrypt/bcrypt.c(249) : warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(363) : see declaration of '_snprintf'
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt_pbkdf.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt_pbkdf.obj
bcrypt_pbkdf.c
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt_python.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt_python.obj
bcrypt_python.c
bcrypt/bcrypt_python.c(63) : warning C4244: 'function' : conversion from 'long' to 'u_int8_t', possible loss of data
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/blowfish.c /Fobuild\temp.win32-3.4\Release\bcrypt/blowfish.obj
blowfish.c
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2146: syntax error : missing ')' before identifier 'passlen'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2081: 'size_t' : name in formal parameter list illegal
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2061: syntax error : identifier 'passlen'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2059: syntax error : ';'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2059: syntax error : ','
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(88) : error C2059: syntax error : ')'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2146: syntax error : missing ')' before identifier 'n'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2081: 'size_t' : name in formal parameter list illegal
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2061: syntax error : identifier 'n'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2059: syntax error : ';'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2059: syntax error : ')'
error: command 'c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2
Complete output from command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\bbarthelet\\AppData\\Local\\Temp\\pycharm-packaging0.tmp\\py-bcrypt\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\BBARTH~1\AppData\Local\Temp\pip-4xfo8xd7-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.4
creating build\lib.win32-3.4\bcrypt
copying bcrypt\__init__.py -> build\lib.win32-3.4\bcrypt
running build_ext
building 'bcrypt._bcrypt' extension
creating build\temp.win32-3.4
creating build\temp.win32-3.4\Release
creating build\temp.win32-3.4\Release\bcrypt
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt.obj
bcrypt.c
bcrypt/bcrypt.c(139) : warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(363) : see declaration of '_snprintf'
bcrypt/bcrypt.c(249) : warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(363) : see declaration of '_snprintf'
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt_pbkdf.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt_pbkdf.obj
bcrypt_pbkdf.c
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/bcrypt_python.c /Fobuild\temp.win32-3.4\Release\bcrypt/bcrypt_python.obj
bcrypt_python.c
bcrypt/bcrypt_python.c(63) : warning C4244: 'function' : conversion from 'long' to 'u_int8_t', possible loss of data
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python34\include -IC:\Python34\include /Tcbcrypt/blowfish.c /Fobuild\temp.win32-3.4\Release\bcrypt/blowfish.obj
blowfish.c
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2146: syntax error : missing ')' before identifier 'passlen'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2081: 'size_t' : name in formal parameter list illegal
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2061: syntax error : identifier 'passlen'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2059: syntax error : ';'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(86) : error C2059: syntax error : ','
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(88) : error C2059: syntax error : ')'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2146: syntax error : missing ')' before identifier 'n'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2081: 'size_t' : name in formal parameter list illegal
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2061: syntax error : identifier 'n'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2059: syntax error : ';'
c:\users\bbarthelet\appdata\local\temp\pycharm-packaging0.tmp\py-bcrypt\bcrypt\pybc_blf.h(91) : error C2059: syntax error : ')'
error: command 'c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\bbarthelet\\AppData\\Local\\Temp\\pycharm-packaging0.tmp\\py-bcrypt\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\BBARTH~1\AppData\Local\Temp\pip-4xfo8xd7-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\bbarthelet\AppData\Local\Temp\pycharm-packaging0.tmp\py-bcrypt
Original issue reported on code.google.com by [email protected]
on 19 Jan 2015 at 9:10
Downloaded release 2.
When I run 'python setup.py build', I get the following warning:
bcrypt/bcrypt_python.c: In function âbcrypt_encode_saltâ:
bcrypt/bcrypt_python.c:56: warning: pointer targets in passing argument 2 of
âencode_saltâ differ in signedness
bcrypt/bcrypt_python.c:29: note: expected âu_int8_t *â but argument is of
type âchar *â
(I think the 'â' are because I have LC_COLLATE="C")
Anyway, editing bcrypt/bcrypt_python.c:40 to say...
u_int8_t *csalt = NULL;
...gets rid of the warning. The generated library passes the provided
regression tests. I can't pretend to know if the change is safe, though.
# python --version
Python 2.6.5
# gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3Copyright (C) 2009 Free Software Foundation,
Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# uname -a
Linux cs 2.6.32-33-generic-pae #72-Ubuntu SMP Fri Jul 29 22:06:29 UTC 2011 i686
GNU/Linux
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.3 LTS"
Original issue reported on code.google.com by [email protected]
on 20 Sep 2011 at 6:40
what modifications to make to be able to use it in google app engine
i'm using aptana
Original issue reported on code.google.com by [email protected]
on 19 May 2012 at 4:13
What steps will reproduce the problem?
1. Try installing it on SmartOS and likely Solaris, or Illuminos
2. It will fail.
This is for the current version.
I've forked it here
http://code.google.com/r/glassresistor-py-bcrypt/source/browse
Sorry for the commits but the net diff is small most just setting up the
environment.
Original issue reported on code.google.com by [email protected]
on 13 Oct 2012 at 9:45
What steps will reproduce the problem?
1. python
2. import bcrypt
I'v got this output:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "bcrypt/__init__.py", line 26, in <module>
from _bcrypt import *
ImportError: No module named _bcrypt
What version of the product are you using? On what operating system?
Ubuntu 11.10
python 2.7
Original issue reported on code.google.com by [email protected]
on 8 May 2012 at 9:23
hi
there is no windows version in the downloaded section, is it no more supported?
am using python 2.7.3 64 bits
Original issue reported on code.google.com by [email protected]
on 26 Jun 2012 at 12:55
What steps will reproduce the problem?
1. open console
2. type "pip install py-bcrypt"
What is the expected output? What do you see instead?
Expected to see "Installed successfully", but among other got
bcrypt/bcrypt_python.c:17:20: fatal error: Python.h: No such file or directory
and
bcrypt/bcrypt_python.c:17:20: fatal error: Python.h: No such file or directory
What version of the product are you using? On what operating system?
py-bcrypt 0.2 trying to run on Ubuntu 11.10
Please provide any additional information below.
Attached pip log file.
After I googled error message it looks like I don't have python dev headers,
and it was not installed by dependencies of py-bcrypt.
Original issue reported on code.google.com by [email protected]
on 28 Mar 2012 at 11:30
Attachments:
What steps will reproduce the problem?
1. python setup.py sdist
What is the expected output? What do you see instead?
Expect that the tarball will include pybc_blf.h. It doesn't.
The following patch fixes the issue.
Original issue reported on code.google.com by [email protected]
on 20 Dec 2011 at 7:13
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.