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.holder import CredentialHolder
from credential_holder.serializer import 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.serializer 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 Distribution
Built Distribution
Hashes for CredentialHolder-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b07a051f00e568fd10985caabc54d48648045a4f1076e0895f358625a8cfee4 |
|
MD5 | ae3c57b3444e54336cb4b3696f9362f4 |
|
BLAKE2b-256 | cd65c424f26d9fa25a5bae57b9056d198fc45db061cc89f916ba7b89a4101b08 |