Skip to main content

SafePickling is a python library that allows you to sign and verify python pickles

Project description

SafePickling

SafePickling is a python library that allows you to sign and verify python pickles.

Installation

pip install safepickling

Usage Example

object = ExampleObject()

server = SafePickling() # Create a server instance
server.generate_key() # Generate a random key for the server
safe_data = server.pickle(object) # Pickle the object and sign it

client = SafePickling() # Create a client instance
client.add_trusted_keys([server.key]) # Add the server's key to the client's trusted keys
client_data = client.unpickle(safe_data) # Unpickle the data while verifying it's signature with the server's key

Cryptography

Random provided by secrets.token_bytes Hash comparison with hmac.compare_digest Hashing done using hashlib.blake2b

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

SafePickling-0.1.2.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

SafePickling-0.1.2-py3-none-any.whl (2.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