Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python interface to CryptoSys PKI

Project Description

This is a Python interface to the CryptoSys PKI Pro library.

Requires: Python 2 (2.6 or above) on Windows platforms only. CryptoSys PKI Pro v11.2 or above must be installed. This is available from

To use in Python’s REPL

>>> from cryptosyspki import *
>>> Gen.version() # "hello world!" for CryptoSys PKI
>>> Hash.hex_from_data('abc') # compute SHA-1 hash in hex of the string 'abc'
>>> Hash.hex_from_data('abc', Hash.Alg.SHA256)   # same but using SHA-256
>>> h ='abc')   # h is a byte array
>>> print Cnv.tohex(h)     # display the byte array in hex

If you don’t like import * and find cryptosyspki a bit long to type each time, try

>>> import cryptosyspki as pki
>>> pki.Gen.version()


Look in the file test\ and you should find an example of use for almost every available method (perhaps contrived somewhat so they’ll work in the test environment, but you should get the idea). See also the main Python web page


There is a series of tests in test\

The tests require certain files to exist in the current working directory and create extra files when they run. To manage this, creates a temporary subdirectory. It requires a subdirectory work to exist in the same folder as the file which should contain all the required test files, available separately in the file The test function then creates a temporary subdirectory which is deleted automatically.

test/  # this module  # spare copies
  work/        # this _must_ exist
    <all required test files>
    pki.tmp.XXXXXXXX/    # created by `setup_temp_dir()`
      <copy of all required test files>
      <files created by tests>


For more information or to make suggestions, please contact us at

David Ireland
DI Management Services Pty Ltd
11 August 2017

Revision History

11.2.0 (2017-08-11)

  • Synchronized version number with main core module (11.2).
  • Substantial changes to inline documentation.
  • Renamed Rng.bytes to Rng.bytestring to avoid clashes with Python built-in function.
  • Changed optional parameters in X509.cert_path_is_valid() and X509.get_cert_count_from_p7().

0.1.1 (2016-08-27)

  • Minor changes.

0.1.0 (2016-05-25)

  • First release of v0.1.0.

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(162.9 kB) Copy SHA256 Hash SHA256
Source None Aug 11, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers