Skip to content

Commit

Permalink
Few updates to PR of 125 (networktocode#129)
Browse files Browse the repository at this point in the history
* initial pass at type hinting and getting mypy to run

* update tasks and ci to do mypy as well

* rm unused import

* fix contributing end-line number

* fix contributing end-line number

* Add py.typed file to signify availability of type hints to third parties.

* Updates to type hinting.

* Add EOS _build_banner type hints.

* Address feedback.

* Linting.

* Remove .idea from commit and ignore in .gitignore.

* Remove remnants of merge conflict.

* PR feedback.

* PR comments.

* Ignore pylint errors for abstract-method.

* Black.

* add examples and better exception messaging

Co-authored-by: Leo Kirchner <[email protected]>
  • Loading branch information
2 people authored and itdependsnetworks committed Nov 3, 2022
1 parent 5320152 commit 1b9e290
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions netutils/password.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,12 @@ def encrypt_type5(unencrypted_password: str, salt: t.Optional[str] = None, salt_

def encrypt_type7(unencrypted_password: str, salt: t.Optional[int] = None) -> str:
"""Given an unencrypted password of Cisco Type 7 password, encypt it.
Args:
unencrypted_password: A password that has not been encrypted, and will be compared against.
salt: A random number between 0 and 15 that can be set by the operator. Defaults to random generated one.
Returns:
The encrypted password.
str (optional): The encrypted password.
Example:
Examples:
>>> from netutils.password import encrypt_type7
>>> encrypt_type7("cisco", 11)
'110A1016141D'
Expand Down

0 comments on commit 1b9e290

Please sign in to comment.