holgern / py-scrypt Goto Github PK
View Code? Open in Web Editor NEWThis is a set of Python bindings for the scrypt key derivation function.
License: Other
This is a set of Python bindings for the scrypt key derivation function.
License: Other
Not sure how to solve this. My code works on various machines but not my AWS Lightsail instance.
I tried running the test. The error:
======================================================================
ERROR: test_hash_vectors_from_csv (scrypt.tests.test_scrypt.TestScryptHash)
Test hash function with precalculated combinations
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/py-scrypt/scrypt/tests/test_scrypt.py", line 194, in test_hash_vectors_from_csv
h = scrypt.hash(row[0], row[1], int(row[2]), int(row[3]), int(row[4]))
File "/home/py-scrypt/scrypt/scrypt.py", line 236, in hash
raise error('could not compute hash')
scrypt.scrypt.error: could not compute hash
----------------------------------------------------------------------
Ran 50 tests in 12.822s
FAILED (errors=1, skipped=5)
Test failed: <unittest.runner.TextTestResult run=50 errors=1 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=50 errors=1 failures=0>
uname -a
Linux 1ed1ff8d0158 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64 GNU/Linux
Lightsail Instance:
1 GB RAM, 1 vCPU, 40 GB SSD
Ubuntu
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
C:\Users\Jomarie Solima\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\OpenSSL-Win64\lib /LIBPATH:C:\python27-x64\libs /LIBPATH:C:\python27-x64\PCbuild\amd64 /LIBPATH:C:\python27-x64\PC\VS9.0\amd64 libcrypto_static.lib advapi32.lib gdi32.lib user32.lib ws2_32.lib /EXPORT:init_scrypt build\temp.win-amd64-2.7\Release\src/scrypt.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/lib/crypto/crypto_scrypt_smix_sse2.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/lib/crypto/crypto_scrypt_smix.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/lib/crypto/crypto_scrypt.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/lib/scryptenc/scryptenc.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/lib/scryptenc/scryptenc_cpuperf.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/lib/util/memlimit.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/libcperciva/alg/sha256.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/libcperciva/crypto/crypto_aes_aesni.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/libcperciva/crypto/crypto_aes.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/libcperciva/crypto/crypto_aesctr.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/libcperciva/crypto/crypto_entropy.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/libcperciva/util/entropy.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/libcperciva/util/insecure_memzero.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/libcperciva/util/warnp.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/libcperciva/util/humansize.obj build\temp.win-amd64-2.7\Release\scrypt-1.2.1/libcperciva/util/asprintf.obj build\temp.win-amd64-2.7\Release\scrypt-windows-stubs/gettimeofday.obj /OUT:build\lib.win-amd64-2.7_scrypt.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\src_scrypt.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\src_scrypt.pyd.manifest
LINK : fatal error LNK1181: cannot open input file 'libcrypto_static.lib'
error: command 'C:\Users\Jomarie Solima\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\link.exe' failed with exit status 1181
I see you're probably working on it but filing this for tracking purposes.
After encrypt() when I want to decrypt I get a data is not a valid scrypt-encryption block
With the use of f-strings in setup.py, is this project still considered python 2 compatible?
Building wheels for Python 3.10 on Windows is explicitly disabled. Can this be enabled and wheels be published for Python 3.10 on Windows?
I wrote a test to test a function where I use .decrypt(). In this test I use the same MAXTIME (0.5) in encrypt as in the tested function. Despite that I get sometimes "decrypting file would take too long" error.
I tried also to encyrpt with 0.5 and decrypt with 1. I also sometimes got the error.
With 0.2/0.5 This seems to work. At least until now.
Why can this happen? And what is the best practice for the MAX values?
On aarch64, pip install py-scrypt builds the wheels from source code and then install it. It requires user to have development environment installed on his system. also, it take some time to build the wheels than downloading and extracting the wheels from pypi.
On aarch64, pip install py-scrypt should download the wheels from pypi
@holgern, Please let me know your interest on releasing aarch64 wheels. I can help in this.
It appears there is no wheel for macos on python 3.9 in 0.8.18, only 3.5, 3.6, 3.7 and 3.8.
There are wheels for 3.9 for linux and windows, but not macos.
Feel free to close if this is intentionally unsupported
scrypt-0.8.19.tar.gz does not include scrypt-windows-stubs/gettimeofday.c
for some reason, causing the installation to fail on windows.
EDIT: probably because the MANIFEST.in
only grabs *.h
files from that dir.
Whenever I try install scrypt I get this error:
fatal error: 'openssl/aes.h' file not found #include <openssl/aes.h> ^~~~~~~~~~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1
I have installed Openssl (via brew) & ran the folllowing commands:
$ export CFLAGS="-I$(brew --prefix openssl)/include $CFLAGS" $ export LDFLAGS="-L$(brew --prefix openssl)/lib $LDFLAGS"
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.