pyca / pynacl

Python binding to the Networking and Cryptography (NaCl) library
https://pynacl.readthedocs.io/
Apache License 2.0
1.06k stars 233 forks source link

Annotations for `nacl.pwhash`. #718

Closed DMRobertson closed 2 years ago

DMRobertson commented 2 years ago

Two commits: one which fixes incorrect annotations in nacl.bindings, and then the changes from #692 which apply to nacl.pwhash. It looks like these were mostly a case of transcribing the types in docstrings to the annotation syntax.

reaperhulk commented 2 years ago

The reason ffi.string is called that is because it assumes it's a C string (and is therefore null terminated). Confusing for str vs bytes in Python though, I agree.