Closed eddthelucky closed 6 months ago
This error message indicates that you are passing a string where a bytes is required. To the best of my memory, passing bytes has always been a requirement of this API.
If you think you have a regression, please provide a minimal executable reproducer that works on one version of bcrypt and errors on another.
I ran into a type error when running
bcrypt.checkpw(password, hashed_password)
. I generated a hashed password withbcrypt.hashpw(str.encode(password), bcrypt.gensalt(prefix=b"2b"))
when password was0
.TypeError: argument 'password': 'str' object cannot be converted into 'PyBytes'
Considering this worked with
3
and not0
I'm guessing there's a bug?