netutils
netutils copied to clipboard
fix: correctly handle `salt=0` in `encrypt_cisco_type7`
The function encrypt_cisco_type7 was incorrectly handling the integer 0 as a missing argument because of the thruthiness check (if not salt:). This resulted in a random salt being used when the user explicitely requested salt 0.
The condition has been updated to if salt is None to differentiate between a provided 0 and the default None.
Fixes #741