Update Readme Files

This commit is contained in:
2025-11-13 23:56:05 +00:00
parent e51c5184e9
commit 5c33d45112
11 changed files with 155 additions and 153 deletions

18
tests/test_cli2.py Normal file
View File

@@ -0,0 +1,18 @@
from salt import hash_password
from salt2 import main
def test_main_generate_with_algorithm_flag():
"""Verify salt2 CLI accepts --algorithm flag."""
assert main(["generate", "--algorithm", "pbkdf2", "secret"]) == 0
def test_main_verify_with_algorithm_flag():
"""Verify salt2 CLI verify accepts --algorithm flag."""
salt, hashed = hash_password("secret", algorithm="pbkdf2")
assert main(["verify", "--algorithm", "pbkdf2", "secret", salt, hashed]) == 0
def test_main_list_algorithms_command():
"""Verify salt2 CLI has list-algorithms command."""
assert main(["list-algorithms"]) == 0