Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add encrypt_type9 function to netutils.password #253

Merged
merged 4 commits into from
Apr 13, 2023

Conversation

abates
Copy link
Contributor

@abates abates commented Mar 30, 2023

Related to #96

alextremblay and others added 2 commits March 30, 2023 14:56
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`
@jeffkala jeffkala merged commit 5931441 into networktocode:develop Apr 13, 2023
@abates abates deleted the type-9 branch April 13, 2023 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants