-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add encrypt_type9 function to netutils.password (#253)
* add missing dev dependency 'pytest-cov' pytest option '--no-cov' causes pytest to crash if pytest-cov plugin not installed add 'cryptography' to optional dependencies cisco type 9 passwords use the scrypt key derivation function, as implemented in the cryptography package implement `encrypt_type9` function add test for `encrypt_type9` function add `encrypt_type9` to jinja filters mapping run `development_scripts.py` to update docs improve encrypt_type9 salt generator salt generator using base85 may produce salt which includes '$'. The `get_hash_salt` function will not be able to reliably extract the salt from any hash produced using this generator switches to a `secrets`-based salt generator implement `compare_type9` function add tests for `compare_type9` function update jinja filter mapping and docs replace scrypt KDF implementation remove dependence on `cryptography` package simplify salt generator update test data update test suite with input/output derived from real switch config add cryptography as an optional dependency make scrypt implementation compatible with more python versions clean up base64 encoding scheme in `encrypt_type9` lint `password.py` * Removed dependency on external library * Reverted pyproject.toml * Removed optional code --------- Co-authored-by: Alex Tremblay <[email protected]> Co-authored-by: Andrew Bates <[email protected]>
- Loading branch information
1 parent
2db98a3
commit 5931441
Showing
4 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters