No project description provided
Project description
PySequoia
Note: This is a work in progress. The API is not stable!
Building:
set -euxo pipefail
python3 -m venv .env
source .env/bin/activate
pip install maturin
maturin develop
Now open the console with python
and import the library:
from pysequoia import Cert, Context
Available functions
encrypt
Signs and encrypts a string to one or more recipients:
s = Cert.from_file("signing-key.asc")
r = Cert.from_bytes(open("wiktor.asc", "rb").read())
encrypted = Context.standard().encrypt(s, r, "content to encrypt")
print(f"Encrypted data: {encrypted}")
merge
Merges data from old certificate with new packets:
old = Cert.from_file("wiktor.asc")
new = Cert.from_file("wiktor-fresh.asc")
merged = old.merge(new)
print(f"Merged, updated cert: {merged}")
minimize
Discards expired subkeys and User IDs:
cert = Cert.from_file("wiktor.asc")
minimized = Context.standard().minimize(cert)
print(f"Minimized cert: {minimized}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pysequoia-0.1.4.tar.gz
(3.2 MB
view details)
Built Distribution
File details
Details for the file pysequoia-0.1.4.tar.gz
.
File metadata
- Download URL: pysequoia-0.1.4.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0023e4fb043ae22e2c317abf498f7a6497dda23c6f8a852d38e7e7a9cb229bd9 |
|
MD5 | bc9c4f88903e46b3ece7df1ea7db4bac |
|
BLAKE2b-256 | ed7b5792bbe754dd7c9f0edbe787700d150c9e30b2ae700286b95135a4034024 |
File details
Details for the file pysequoia-0.1.4-cp310-cp310-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: pysequoia-0.1.4-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e58a8ededd1bdc94f6e75489bf2b3a0abe9a1ec33e509fe81c2386bcca342e64 |
|
MD5 | 74dfea5c25383383bb74fdd412cbf67e |
|
BLAKE2b-256 | 51e9386c9463bbb8af2c8dab5fc906e8a3ee663a679fd8184fccb08a42bd9d21 |