Skip to main content

PyMangler contains a pure-python "encryption" scheme that can be used to *obfuscate* and *disguise* datain situations where strong encryption is not available,and security is not necessarily top priority.

Project description

PyMangler

PyMangler contains a pure-python "encryption" scheme that can be used to obfuscate and disguise data in situations where strong encryption is not available, and security is not necessarily top priority. It is fairly fast but large amounts of data takes time.

Install

pip install PyMangler

Setup

The key file that comes with PyMangler will work, but you should generate a new key by running the keygen.py file. You should see the following text and a file named key will be generated:

Generating key...
Key generated.
Validating key for prosperity...
Key is valid.  Encryptor working successfully!

Key validation from the built in key generator should realistically never fail, but it's validated anyway.

PyMangler's encryption algorithm was designed to give a fairly flat distribution frequency, and repeating patterns in pre-encrypted text does not generate repeating cipher-text that would give any indication of a pattern.

hello hello hello hello hello hello hello hello
̬ĮʀÀ
(ŬNJ–ɢʷMfDZċǚϺ-éȼ˭̕ȿïɐDžƹ{əʺʙΦΑțϾɚɛ͜ǙʡƽǛť

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ΧϬʸΟϫ«™͚ǣϱȐ˩ȍ3͜p̚ĺ̒bĘʇɅ͋Ƚďɏ͛ʬƥƏƼʌˢ͊ǝͅ#ȇƄƩŨ϶Ǖ³¾

Usage

from PyMangler.mangle import Encryptor

# The Encryptor class will generate a key to use
# on instantiation. Save your key file or else
# you won't be able to recover encrypted data.

e = Encryptor()
e.save_key_file(filepath='/Path/To/Key/File')
# once you save a key file you wouldn't want to 
# overwrite it so make sure you create a key
# generator or use the one provided.

# You can load the key file you saved.
e.load_key_file(filepath='/Path/To/Key/File')

# If you don't like PyManglers key contruction 
# methods you can use the make_key method to 
# create your own. Just pass a list of random
# characters and Encryptor will number each 
# character starting from 1.
e.make_key(['d', 'c', 'b', 'e', 'g', 'a', 'f'])

# if you want Encryptor to randomize your
# key for you, use make_randomized_key.
e.make_randomized_key(['a', 'b', 'c', 'd', 'e', 'f', 'g']) 

# Using either make_key or make_randomized_key
# will make Encryptor use your given characters

# Calling Encryptor.save_key_file will save your
# created key to a file that can be loaded later.

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

PyMangler-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

PyMangler-0.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file PyMangler-0.0.1.tar.gz.

File metadata

  • Download URL: PyMangler-0.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

File hashes

Hashes for PyMangler-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a6fef3a112990120e20ca922414a4ba2a1317781ca3da3f9620f95bb1dde1482
MD5 8f25327be4b947d0a3ebe3ec40fcc25e
BLAKE2b-256 709a6e77245a780dc5460ea497b8ec918dfa1349669eed3f6d12267afab102a7

See more details on using hashes here.

File details

Details for the file PyMangler-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: PyMangler-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.2

File hashes

Hashes for PyMangler-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b61e1394af1fdd7bbe6c1669df15a5f9eb4a55a4e7dfb84df29f97268f73b6f4
MD5 4bb84c21cb50a8bdfd1006ead281463a
BLAKE2b-256 4721a6221bd7716d10b30a63a2228de0011e9dd847ef7af89effdd636c1663ed

See more details on using hashes here.

Supported by

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