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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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