Skip to main content

A simple way to handle basic data encryption.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swiftencrypt-1.0.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swiftencrypt-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file swiftencrypt-1.0.0.tar.gz.

File metadata

  • Download URL: swiftencrypt-1.0.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for swiftencrypt-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5d50b2e6f2b0a65168b71e28c5bc8568a8f08d233174441f86e118f005ff9b05
MD5 6f589e6ac03636842a43a19436a5fe13
BLAKE2b-256 1bef24195da99aa8b7b01b92f3bc76334d81f37606e4dfcdc91dda4565719174

See more details on using hashes here.

File details

Details for the file swiftencrypt-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: swiftencrypt-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for swiftencrypt-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d97cb06454ca40fa0bb4f73dae777a2f633564845c18fc161dedfb9d89cb242
MD5 20e3fe0d36dba0b90a61e4a62c359c8f
BLAKE2b-256 6edf49a8f7aa1dea2fa9a8e39212979307e9ef96cc6f07f06c9de17fafe1c7f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page