Skip to main content

Self contained obfuscation of hardcoded passwords in Python scripts.

Project description

obscure-password

Python package codecov

Overview

obscure-password is a self contained obfuscation library for hardcoded passwords (or other text) in Python scripts. Obfuscation is a technique to prevent the unskilled or casual observer access to sensitive data and provide an impediment to the skilled i.e. requiring explicit effort to circumvent. Typical use cases are in casual software development or debugging where a developer may be sharing scripts with field technicians to perform one-off tasks.

Usage

>>> from obscure_password import obscure, unobscure
>>> obscured = obscure('my sensitive information')
>>> print(obscured)
fxFpdVRHWRJjTkFnN0lmMTQ7NSslBB4jby8kMgofJFU5Lz0A
>>> unobscure(obscured)
'my sensitive information'

obscure_password laces the obscured text with a marker which enables it to avoid unobscuring text that has not been obscured.

>>> from obscure_password import obscure, unobscure
>>> unobscure('my sensitive information')
'my sensitive information'

This is helpful when developing a script and wanting to regularly change the password.

Limitations

  • Ofuscation is NOT secure!
  • obscure-password was designed for password obfuscation and not to obscure large texts. The base64 encoding increases the obscured text length by x1.25 plus 16 characters, for the marker, over the original text length.
  • The text size obscured / unobscured is unrestricted (limited by RAM & patience). As a first approximation for large texts memory required is +1.25x the original text size.

Sunburst Code Coverage Chart

The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.

Sunburst

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

obscure-password-1.0.3.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

obscure_password-1.0.3-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file obscure-password-1.0.3.tar.gz.

File metadata

  • Download URL: obscure-password-1.0.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for obscure-password-1.0.3.tar.gz
Algorithm Hash digest
SHA256 5fafce5bc43163c325634360acd9c1ecbcadffd065dafb8325181e847ff6a434
MD5 cfe1826a72ea43c74283b9510ad9abed
BLAKE2b-256 1bbb8079e98002360dc851fc268563b58dee672fcbdeace837254ecdf2139173

See more details on using hashes here.

File details

Details for the file obscure_password-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: obscure_password-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for obscure_password-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 42b0562831911500b1185665d908252dc30899b4e833b786b7a3e06021986559
MD5 f3bdb4cb51578af779b46cc7ebf6dfe4
BLAKE2b-256 dcaafcd0a01011ec0069b5c56b9cf5655277e87498ef1202db60662613400ac7

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