Metadata-Version: 2.1
Name: safepickling
Version: 0.1.1
Summary: SafePickling is a python library that allows you to sign and verify python pickles
License: MIT
Author: Wissotsky
Author-email: Wissotsky@protonmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown

# SafePickling

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

## Installation

`pip install safepickling`

## Usage

```python
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`

