Skip to main content

Dynamic_enc is a package which uses rolling encryption key.

Installation

$ pip install dynamic_enc

How it works

Consider two keys and for our convenience let's consider them as previous key and current key

The encrypter returns an encrypted string of three parameters

  1. hashed Current key encrypted by previous key
  2. New key encrypted by previous key
  3. Data(needs to be sent) encrypted by New key

The whole string is encrypted in current key

eg . '1,2,3' (these 1 ,2, 3 are the above list)

Methods

  1. You have to initialize the module with your custom previous and current key eg. object = dyno_encrpter(key) #(Key must be an array)
  2. You can later reassign keys with assign_key(keys)
  3. encrypt(data) This method is uses the method above to encrypt your data
  4. decrypt(data) This method is uses the method above to decrypt your data
  5. get_current_keys() Will return the current keys in use
  6. generate_key() This method will help to generate keys( you can use it for initialization)

Examples

from dynamic_enc import *

keys = dyno_encrypter.generate_keys()
encryption_object = dyno_encrypter(keys)

encrypted_data = encryption_object.encrypt("Hello")
decrypted_data = encryption_object.decrypt(encrypted_data)

current_keys = encryption_object.get_current_keys()

print(encrypted_data,decrypted_data,current_keys)

Enjoy!!!

Metadata

Release files for dynamic-enc 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dynamic-enc 0.0.1
File Size Uploaded Provenance
dynamic_enc-0.0.1.tar.gz 3.6 kB Without provenance Details

Release files / dynamic_enc-0.0.1.tar.gz

Download URL dynamic_enc-0.0.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
28e02e0613c3edd9bc299bb103d2278c721e65d20825fbf676f820959376cca4
BLAKE2b-256 checksum
How to use checksums
587c6c8e3ece1cbe1d3f961e90278d2d38387325d49bd91a4ad67864b0a692df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.7.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Security for dynamic-enc 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page