2 ms·
pbkdf2 is included in Python's stdlib since 2.7.8[0] and 3.4[1], though sadly the interface isn't great: it outputs the hash only, not a modular crypt[2] and it
by masklinn 11y ago
pbkdf2 is included in Python's stdlib since 2.7.8[0] and 3.4[1], though sadly the interface isn't great: it outputs the hash only, not a modular crypt[2] and it requires a salt instead of generating one. Passlib[3] provides more algorithms, a much better interface and handles hash migrations[4] ridiculously cleanly.
[0] https://docs.python.org/2/library/hashlib.html#hashlib.pbkdf2_hmac https://docs.python.org/2/library/hashlib.html#hashlib.pbkdf...
[1] https://docs.python.org/3.5/library/hashlib.html#hashlib.pbkdf2_hmac https://docs.python.org/3.5/library/hashlib.html#hashlib.pbk...
[2] http://pythonhosted.org/passlib/modular_crypt_format.html#modular-crypt-format http://pythonhosted.org/passlib/modular_crypt_format.html#mo...
[3] http://pythonhosted.org/passlib http://pythonhosted.org/passlib
[4] increase of rounds # or KDF change http://pythonhosted.org/passlib/lib/passlib.context-tutorial.html#deprecation-hash-migration http://pythonhosted.org/passlib/lib/passlib.context-tutorial...