SwiftEncrypt
Copyright (c) 2025 Sean Yeatts, Inc. All rights reserved.
A simple way to handle basic data encryption. Easily extendable to support custom encryption algorithms.
Key Features
Implements an intuitive, straightforward encryptor-keygen paradigm.
Quickstart
Example - basic Fernet-style symmetrical encryption :
# IMPORTS
from swiftencrypt import FernetCipher, ExampleKeygen
# MAIN DEFINITION
def main() -> None:
# [1] Prepare some data
original = b'test'
# [2] Choose an encryption strategy
keygen = ExampleKeygen()
encryptor = FernetCipher(keygen)
# [3] Perform encryption
encrypted = encryptor.encrypt(original)
# [4] ( DEBUG ) Verify the encryption ( for symmetrical strategies )
decrypted = encryptor.decrypt(encrypted)
print(original)
print(encrypted)
print(decrypted)
# ENTRY POINT
if __name__ == "__main__":
main()
Installation
Prerequisites:
Python 3.8 or higher is recommended
pip 24.0 or higher is recommended
For a pip installation:
Open a new Command Prompt. Run the following command:
py -m pip install swiftencrypt
For a local installation:
Extract the contents of this module to a safe location. Open a new terminal and navigate to the top level directory of your project. Run the following command:
py -m pip install "DIRECTORY_HERE\swiftserialize\dist\swiftencrypt-1.0.0.tar.gz"
DIRECTORY_HERE should be replaced with the complete filepath to the folder where you saved the SwiftEncrypt module contents.
Depending on the release of SwiftEncrypt you’ve chosen, you may have to change 1.0.0 to reflect your specific version.
Metadata
Release files for swiftencrypt 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| swiftencrypt-1.0.0.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swiftencrypt-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / swiftencrypt-1.0.0.tar.gz
| Download URL | swiftencrypt-1.0.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d50b2e6f2b0a65168b71e28c5bc8568a8f08d233174441f86e118f005ff9b05
|
|
BLAKE2b-256 checksum How to use checksums |
1bef24195da99aa8b7b01b92f3bc76334d81f37606e4dfcdc91dda4565719174
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Release files / swiftencrypt-1.0.0-py3-none-any.whl
| Download URL | swiftencrypt-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d97cb06454ca40fa0bb4f73dae777a2f633564845c18fc161dedfb9d89cb242
|
|
BLAKE2b-256 checksum How to use checksums |
6edf49a8f7aa1dea2fa9a8e39212979307e9ef96cc6f07f06c9de17fafe1c7f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|