Questions tagged [passlib]

passlib is a Python library for key derivation and hashing functions

See also

50 questions
0
votes
1 answer

WTForms stores wrong password hash

I'm using WTForms-Alchemy to define forms from model objects. I defined a field as a password thus: password = db.Column(PasswordType(schemes=['pbkdf2_sha512']), nullable=True) I persist the form to PostgreSQL and I always end up with the wrong hash…
ruipacheco
  • 15,025
  • 19
  • 82
  • 138
-1
votes
1 answer

Using passlib can register the password but can't verify it again getting error

I am using passlib to store the password in my sqlite database. I am not getting error while storing the new password(registration). But when I try to login with the same user I am getting this error 'TypeError: hash must be unicode or bytes, not…
user11862294
-1
votes
1 answer

Hashed password doesn't match original in Python

I've two rest endpoints, one that registers an user and the second that lets that user login. This is the code that I'm using to hash the user's password and store the hashed password in the database, from passlib.hash import pbkdf2_sha256 def…
Melissa Stewart
  • 3,483
  • 11
  • 49
  • 88
-1
votes
1 answer

What is `$6$rounds=` when running Passlib with Python?

I'm generating SHA-512 encoded password keys with Python's Passlib's command. python -c "from passlib.hash import sha512_crypt; import getpass; print sha512_crypt.encrypt(getpass.getpass())" This is per Ansible documentation:…
tim_xyz
  • 11,573
  • 17
  • 52
  • 97
-3
votes
2 answers

TypeError: hash must be unicode or bytes, not builtin_function_or_method

I am trying to implement JWT authorization to a Flask app. However when I try to login, It returns a "500 Internal server error" with a "TypeError: hash must be unicode or bytes, not builtin_function_or_method". What could I be missing out…
Nelson M
  • 1,658
  • 4
  • 13
  • 19
1 2 3
4