netutils icon indicating copy to clipboard operation
netutils copied to clipboard

fix: correctly handle `salt=0` in `encrypt_cisco_type7`

Open mathieu-mp opened this issue 2 months ago • 1 comments

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

mathieu-mp avatar Nov 20 '25 09:11 mathieu-mp