Repository navigation
Smart Passwords Library (smartpasslib) v2.0.0
Smart Passwords Library (smartpasslib) v2.0.0
🔄 What's New in v2.0.0
Major Changes:
API Simplification:
- Removed
loginparameter from all methods - now uses onlysecretphrase - Simplified
SmartKeyGeneratorto work with singlesecretparameter - Removed
SmartPasswordMaster.generate_default_smart_password()method
Data Model Updates:
SmartPasswordclass updated:login→description,key→public_key- All deprecated methods removed (not just marked as deprecated)
- Removed deprecated
file_pathproperty fromSmartPasswordManager
Security Improvements:
- Simplified key derivation algorithm in
SmartKeyGenerator - Cleaner seed management in
SmartPasswordGenerator - Removed complex hash mixing from v1.x
Testing & Quality:
- 100% test coverage achieved
- Comprehensive exception testing added
- Improved test fixtures and data management
Breaking Changes:
Method Signature Changes:
# v1.x → v2.0
SmartPasswordMaster.generate_smart_password(login, secret, length)
SmartPasswordMaster.generate_smart_password(secret, length)
SmartPasswordMaster.generate_public_key(login, secret)
SmartPasswordMaster.generate_public_key(secret)
SmartPasswordMaster.check_public_key(login, secret, public_key)
SmartPasswordMaster.check_public_key(secret, public_key)Class Structure Changes:
# v1.x → v2.0
SmartPassword(login, key, length)
SmartPassword(public_key, description, length)
SmartKeyGenerator._create_key(login, secret, steps)
SmartKeyGenerator._create_key(secret, steps)Removed Methods:
SmartPasswordManager.add()→ useadd_smart_password()SmartPasswordManager.get_password()→ useget_smart_password()SmartPasswordManager.remove()→ usedelete_smart_password()SmartPasswordManager.load_file()→ internal_load_data()SmartPasswordManager.save_file()→ internal_write_data()SmartPasswordManager.file_path→ usefilenameSmartPasswordMaster.generate_default_smart_password()
Migration Guide:
Password Generation:
# v1.x
password = SmartPasswordMaster.generate_smart_password(
login="service",
secret="mysecret",
length=12
)
# v2.0
password = SmartPasswordMaster.generate_smart_password(
secret="mysecret",
length=12
)SmartPassword Creation:
# v1.x
sp = SmartPassword(
login="GitHub",
key=public_key,
length=16
)
# v2.0
sp = SmartPassword(
public_key=public_key,
description="GitHub",
length=16
)Manager Operations:
# v1.x (deprecated methods)
manager.add(password)
manager.get_password("login")
# v2.0
manager.add_smart_password(sp)
manager.get_smart_password(public_key)Key Improvements:
- Simplified API - Single
secretparameter instead oflogin+secret - Cleaner Code - Removed all deprecated methods and legacy code
- Better Security - Streamlined cryptographic operations
- Full Test Coverage - 100% test coverage ensures reliability
- Clearer Naming -
public_keyaccurately represents verification key
Note: v2.0.0 is not backward compatible with v1.x. Update your code according to the migration guide.
Full Changelog: 1.2.1...v2.0.0