Skip to main content

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


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)

Uploaded Source

Built Distribution

pysequoia-0.1.4-cp310-cp310-manylinux_2_34_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.34+ x86-64

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

Hashes for pysequoia-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0023e4fb043ae22e2c317abf498f7a6497dda23c6f8a852d38e7e7a9cb229bd9
MD5 bc9c4f88903e46b3ece7df1ea7db4bac
BLAKE2b-256 ed7b5792bbe754dd7c9f0edbe787700d150c9e30b2ae700286b95135a4034024

See more details on using hashes here.

File details

Details for the file pysequoia-0.1.4-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for pysequoia-0.1.4-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e58a8ededd1bdc94f6e75489bf2b3a0abe9a1ec33e509fe81c2386bcca342e64
MD5 74dfea5c25383383bb74fdd412cbf67e
BLAKE2b-256 51e9386c9463bbb8af2c8dab5fc906e8a3ee663a679fd8184fccb08a42bd9d21

See more details on using hashes here.

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