Skip to main content

simple class for serializable and secure credential holder

Project description

Simple Serializable Credential Holder

This is a simple class for handling credentials. It is serializable for data transfer and is able to securely hold credentials in its constructed form.

Usage

To get a serialized credential holder, start by picking a passphrase (that you must remember or keep track of) for usage as an encryption key. Then, create an instance of the CredentialHolder object using the credential you want to encrypt and the passphrase and you can serialize it and use the string to store or communicate the credentials.

from credential_holder import CredentialHolder, CredentialHolderSerializer


credential_holder = CredentialHolder("passphrase", "password")
serialized_credential_holder = CredentialHolderSerializer.serialize_credential_holder(credential_holder)

This creates something along the lines of

serialized_credential_holder = 'aG9sZGVyLl' + 'GQzXHInKQ==' # shortened representation of a large base64 string

This value can be then transferred and used elsewhere as follows

from credential_holder import  CredentialHolderSerializer

serialized_credential_holder = "same_as_above"

credential_holder = CredentialHolderSerializer.deserialize_credential_holder(serialized_credential_holder)

credential_holder.get_credential("passphrase")

Using the wrong passphrase will cause an Exception - you will not be able to decrypt a Credential Holder or serialized string unless you have the same passphrase that was used to create it.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

CredentialHolder-0.0.7-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file CredentialHolder-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: CredentialHolder-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.0

File hashes

Hashes for CredentialHolder-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c30ed7f6484ee755fcd7585beedcfc90d25ac9d5ea026e0ff300c824ece4792a
MD5 5daca5b98087cb451e4a7dcaff206176
BLAKE2b-256 e9405e684ecd7c846f61a7d8a913d1c8649bae90ac1eab576485556a6299eedc

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