Skip to main content

Provides encryption and signing capabilities through Sequoia

Project description

#+TITLE: PySequoia
#+HTML_HEAD: <link rel="stylesheet" href="doc/tufte.min.css">
#+PROPERTY: header-args :tangle yes :exports both
#+OPTIONS: html-postamble:nil

Note: This is a work in progress. The API is *not* stable!

Building:

#+BEGIN_SRC sh
python3 -m venv .env
source .env/bin/activate
pip install maturin
maturin develop
#+END_SRC

Now open the console with =python= and import the library:

#+BEGIN_SRC python
import pysequoia
#+END_SRC

** Available functions

*** encrypt

Signs and encrypts a string to one or more recipients:

#+BEGIN_SRC python
s = open("signing-key.asc", "r").read()
r = open("wiktor.asc", "r").read()
pysequoia.encrypt(s, r, "content to encrypt")
#+END_SRC

*** merge

Merges data from old certificate with new packets:

#+BEGIN_SRC python
old = open("wiktor.asc", "r").read()
new = open("wiktor-fresh.asc", "r").read()
pysequoia.merge(old, new)
#+END_SRC

*** minimize

Discards expired subkeys and User IDs:

#+BEGIN_SRC python
cert = open("wiktor.asc", "r").read()
pysequoia.minimize(cert)
#+END_SRC

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.2.tar.gz (3.2 MB view hashes)

Uploaded Source

Built Distribution

pysequoia-0.1.2-cp310-cp310-manylinux_2_34_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.34+ x86-64

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