uonet-request-signer/hebe-python
2020-10-08 12:23:33 +02:00
..
tests [hebe-python] Export key pair generation method. Add generator tests. 2020-10-08 12:23:33 +02:00
uonet_request_signer_hebe [hebe-python] Export key pair generation method. Add generator tests. 2020-10-08 12:23:33 +02:00
.gitignore [hebe-python] Add new implementation 2020-10-06 20:08:04 +02:00
LICENSE [hebe-python] Add new implementation 2020-10-06 20:08:04 +02:00
README.md [hebe-python] Export key pair generation method. Add generator tests. 2020-10-08 12:23:33 +02:00
setup.py [hebe-python] Export key pair generation method. Add generator tests. 2020-10-08 12:23:33 +02:00

UONET+ (hebe) request signer for Python

pypi

Installation

$ pip install -U uonet-request-signer-hebe

Usage

Generate an RSA2048 key pair (private key and certificate):

from uonet_request_signer_hebe import generate_key_pair

certificate, fingerprint, private_key = generate_key_pair()

Sign request content:

from uonet_request_signer_hebe import get_signature_values
from datetime import datetime

digest, canonical_url, signature = get_signature_values(fingerprint, private_key, body, full_url, datetime.now())

Tests

$ python -m pytest .