Skip to main content

Enter a description for this Unimatrix package

Project description

Unimatrix Crypto

A Python library that provides abstraction around various primitives for cryptographic operations.

Supported cryptographic implementations are:

  • RSA PKCS1.5/SHA256

Supported key providers are:

  • Local
  • Google Cloud KMS

Installation

pip install unimatrix.ext.crypto

Usage

When using unimatrix.ext.crypto with Google Cloud KMS, the GOOGLE_APPLICATION_CREDENTIALS environment variable needs to be provided, pointing to your service account JSON credentials.

import os

from unimatrix.ext.crypto.lib.google import Signer


signer = Signer(resource_id="your/kms/key/resource/id")
some_data_to_sign = os.urandom(256)
sig = signer.sign(some_data_to_sign)

print(sig.verify(signer.public, some_data_to_sign))

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

unimatrix.ext.crypto-0.2.4.tar.gz (22.4 kB view details)

Uploaded Source

File details

Details for the file unimatrix.ext.crypto-0.2.4.tar.gz.

File metadata

  • Download URL: unimatrix.ext.crypto-0.2.4.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.1

File hashes

Hashes for unimatrix.ext.crypto-0.2.4.tar.gz
Algorithm Hash digest
SHA256 73790ed56c69ae4577c249989be4e1f4cb09cefe2113dda812ef3965e3c1bbe7
MD5 447224044f431d130f3c1a51ba8e38b6
BLAKE2b-256 048481b6e360ccf975781483231137cd84047c49bea2a3137b696850b0b583a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page