bcrypt
bcrypt copied to clipboard
Emphasise difference between round and work factor
I think it's confusing that the API uses rounds
to describe the work factor of bcrypt; the two are similar but not quite the same, since rounds = 2^(work factor)
. I think it's important with cryptography that terminology is used unambiguously to prevent implementation mistakes. Would you consider changing the name of this parameter to work_factor
, perhaps at some point in the future when you plan a new major release?
We wouldn't be opposed to changing it (although we can bikeshed about cost vs work factor). We'll probably make the next release 5.0.x anyway so if you want to put in a PR and a changelog entry noting that this will be a breaking change for kwarg users that's fine.
although we can bikeshed about cost vs work factor
Exactly. The change isn't that important, so including it subtly in an upcoming major release would be very suitable. I'll see if I can whip up a PR this weekend.
Given that bcrypt is pretty much outdated, I no longer think resolving this issue is worth the effort.