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
Create a passphrase that is used as an encryption key and create an instance of the object using the credential you want to encrypt and the passphrase. Then you can serialize it and use the string to store or communicate the credentials, e.g.
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 = '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 = "same_as_above"
serialized_credential_holder = CredentialHolderSerializer.deserialize_credential_holder(serialized_credential)
serialized_credential_holder.get_credential("passphrase")
Using the wrong passphrase or supplying an invalid serialized credential holder will raise an exception
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.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 235d0e8f05dac7cf677743a1a18fc161f293be564507df7f15026648567d34c0 |
|
MD5 | e8067bc6df79ad0870d2b8212817019f |
|
BLAKE2b-256 | a65996db448aaf7f447c8a42108c461582db947fed62e19d8398a6c867a8b0ef |