Metadata-Version: 2.1
Name: securelock
Version: 1.0.1
Summary: A simple library for secure text encryption and decryption using salted password-based encryption.
Author-email: Umit Tasdelen <umittadelen1277@gmail.com>
License: MIT License
        
        Copyright (c) 2024 umittadelen
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/umittadelen/securelock
Project-URL: Documentation, https://github.com/umittadelen/securelock#readme
Project-URL: Bug Tracker, https://github.com/umittadelen/securelock/issues
Keywords: encryption,decryption,security,password-protection
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# SecureLock

SecureLock is a lightweight Python library for securely encrypting and decrypting text using a password. It utilizes salted key derivation and XOR-based encryption to ensure the integrity and security of your data.

## Features
- Compact design: Only two functions, `lock()` and `unlock()`.
- Salted encryption: Each encryption is unique due to a randomly generated salt.
- Key stretching: Uses SHA-256 hashing to derive a secure encryption key from the password.
- Supports all Unicode characters.

## Installation
```bash
pip install securelock
```

## Usage
### Encrypting Text
```python
from securelock import lock

password = "strongpassword"
text = "This is a secret message!"

# Encrypt the text
locked_text = lock(text, password)
print("Locked Text:", locked_text)
```

### Decrypting Text
```python
from securelock import unlock

# Decrypt the text
unlocked_text = unlock(locked_text, password)
print("Unlocked Text:", unlocked_text)
```

### Example Output
```plaintext
Locked Text: 4a6f1c2b... (encrypted hex string)
Unlocked Text: This is a secret message!
```

## Security Notes
- **Strong Passwords**: Always use strong and unpredictable passwords for maximum security.
- **Key Derivation**: SecureLock uses SHA-256 with a randomly generated 32-byte salt, ensuring each encryption is unique.
- **Brute-Force Resistance**: The implementation is designed to make brute-forcing computationally expensive.

## License
This project is licensed under the MIT License. See [LICENSE](./package/LICENSE.txt) for details.

## Contributing
Feel free to submit issues or feature requests. Contributions are welcome!
