Questions tagged [passlib]

passlib is a Python library for key derivation and hashing functions

See also

50 questions
1
vote
0 answers

py2app successful, but app crashes beyond login "bcrypt" password check window

This project here: https://github.com/patarapolw/HosPy setup.py is as follows from setuptools import setup APP = ['HosPy'] DATA_FILES = [ ('database',['database/login.db']) ] OPTIONS = { 'includes': ['cffi'], 'plist': { …
Polv
  • 1,918
  • 1
  • 20
  • 31
1
vote
0 answers

verify js pbkdf2-sha256 hash with python passlib

I encrypt a random string in python file and hashit in javascript using pbkdf2-sha256 but some how the verification fails with python passlib . any idea why? my python code is : from passlib.hash import pbkdf2_sha256 import os,random,string t =…
1
vote
1 answer

How to limit key length with Passlib 1.7+

A server protocol requires me to derive a password hash with a limited key size. This is the given JavaScript + CryptoJS implementation: var params = {keySize: size/32, hasher: CryptoJS.algo.SHA512, iterations: 5000} var output =…
matthias
  • 2,161
  • 15
  • 22
1
vote
2 answers

unable to import passlib in python 3.5.2

I am trying to use passlib in python 3.5.2 installed on Windows 8.1. I installed passlib using : pip install passlib It installed without any issues, but whenever I try to use it from passlib.hash import pbkdf2_sha256 I get the error message:…
Chris Topher
  • 37
  • 2
  • 7
1
vote
1 answer

Why does this passlib hashing script create a new result every time I run the script?

I'm using the following script from the passlib docs to hash a password: # import the hash algorithm from passlib.hash import sha256_crypt #…
YPCrumble
  • 26,610
  • 23
  • 107
  • 172
1
vote
1 answer

Is it save to store passwords encrypted with sha256_crypt but without additional salt

Is it save to create a hash of user passwords with sha256_crypt.encrypt("secretUserPassword") and store it to a database without adding a slat to the hash? If so, what protects the hashes against rainbow table attacks? This is how I create a new…
eztam
  • 3,443
  • 7
  • 36
  • 54
1
vote
1 answer

"malformed htpasswd file" error message when starting pypi-server

When starting the pypi-server I get an error message saying "malformed htpasswd file". I get the error message even if the .htpasswd file does not exist. What is causing the error? Here is the entire Traceback: C:\Data>pypi-server -p 8080 -P…
MikeSchneeberger
  • 463
  • 5
  • 10
1
vote
1 answer

Python - passlib

i have a problem parsing a string from a file to passlib.hash.sha512_crypt.encrypt() My Code is this: from passlib.hash import sha512_crypt h = input("sha512: ") s = input("salt: ") d = input("dictionary: ") dictionary = open(d, "r") for l in…
nautilor
  • 106
  • 12
0
votes
0 answers

Getting [ModuleNotFoundError: No module named 'passlib'] this even passlib is already installed

cjson not found, falling back to stdlib json Traceback (most recent call last): . . from Crypto.Hash import HMAC, SHA256, SHA384, SHA512 ModuleNotFoundError: No module named 'Crypto also, from passlib.context import…
0
votes
2 answers

What python code was used to generate this pbkdf2-sha512 password entry?

I have the following hashed entry in a password file: $pbkdf2-sha512$25000$K0XonfPe29vbW0up9X5vDQ$3scRqpOxF29.tqPWpKJmcFvpb8/SFtbAiI2UlrM473B3tD.Mw8xzamNaE0KpZApTc7N1stlK/vvdUl9xna6wIA Now, I know that the password used to generate this entry was…
Alex
  • 1
  • 2
0
votes
1 answer

Converting Passlib hash salt and digest to regular / PHC Base64

I need to port a passlib (pbkdf2-sha512 to be specific) digest to another system (Auth0) and need to convert it to PHC string format using a B64 encoded salt (regular base64 without padding characters). Passlib encodes to a shortened base64 format…
R2Bleep2
  • 77
  • 1
  • 7
0
votes
0 answers

passlib ModuleNotFound Error but I HAVE installed passlib

I am trying to use: from passlib.hash import pbkdf2_sha512 I have installed passlib - I even uninstalled then reinstalled it. When I run my program the error I get is: ModuleNotFoundError: No module named 'passlib' I am so confused.... I have the…
Tasi Tele
  • 1
  • 1
  • 5
0
votes
1 answer

Python passlib generate one time secret code

What is the easiest way to generate a one-time password (sms secret code with N lengths of symbols) with passlib? How I'm creating it now: from secrets import randbelow as secrets_randbelow def create_secret_code() -> str: # TODO use OTP …
salius
  • 918
  • 1
  • 14
  • 30
0
votes
1 answer

How would I verify that user entered password is the same as the hashed password form database

When I run the code and enter a password that's old and hasn't been hashed it tells me that it is tuple which isn't the problem but when I try to verify a hashed password I get that my password is wrong so I wonder what's wrong with my code. I'm new…
Gabe
  • 1
  • 1
0
votes
0 answers

Fast one way and secure hashing algorithms

I have been going around the existing hashing algorithms to hash password for a small microservice that uses basic auth for authentication. As per the community standard I chose bcrypt algo to hash the password. But after benchmarking the server…
cedzz
  • 389
  • 2
  • 9