crsysapi-6.20.0
توضیحات
Python interface to CryptoSys API
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | crsysapi-6.20.0 |
| نام | crsysapi |
| نسخه کتابخانه | 6.20.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | David Ireland |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://www.cryptosys.net/ |
| آدرس اینترنتی | https://pypi.org/project/crsysapi/ |
| مجوز | See source code modules |
A Python interface to CryptoSys API
===================================
This is a Python interface to the **CryptoSys API** library.
Requires: Python 3.
CryptoSys API v6.20 or above must be installed.
This is available from
https://www.cryptosys.net/.
To use in Python's REPL
-----------------------
Using wild import for simplicity.
.. code-block:: python
>>> from crsysapi import * # @UnusedWildImport
>>> Gen.version() # "hello world!" for CryptoSys API
62000
>>> Hash.hex_from_data(b'abc') # compute SHA-1 hash in hex of 'abc' as bytes
'a9993e364706816aba3e25717850c26c9cd0d89d'
>>> Hash.hex_from_string('abc', Hash.Alg.SHA256) # same but over a string and using SHA-256
'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'
>>> h = Hash.data(b'abc') # h is a byte array (bytes->bytes)
>>> print(Cnv.tohex(h)) # display the byte array in hex
A9993E364706816ABA3E25717850C26C9CD0D89D
The proper way using the ``crsysapi`` prefix.
.. code-block:: python
>>> import crsysapi
>>> crsysapi.Gen.version() # Underlying core CryptoSys API dll
62000
>>> crsysapi.__version__ # crsysapi.py module version
6.20.0.0000
>>> crsysapi.Hash.hex_from_data(b'abc') # compute SHA-1 hash in hex of 'abc' as bytes
'a9993e364706816aba3e25717850c26c9cd0d89d'
>>> crsysapi.Hash.hex_from_string('abc', crsysapi.Hash.Alg.SHA256) # same but over a string and using SHA-256
'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'
>>> h = crsysapi.Hash.data(b'abc') # h is a byte array (bytes->bytes)
>>> print(crsysapi.Cnv.tohex(h)) # display the byte array in hex
A9993E364706816ABA3E25717850C26C9CD0D89D
Note that ``crsysapi.Gen.version()`` gives the version number of the underlying core CryptoSys API DLL, and ``crsysapi.__version__`` gives the version of the Python crsysapi modulw.
Examples
--------
See the test file ``test/test_crsysapi.py`` for examples of all classes and methods. This creates any required test files automatically.
Contact
-------
For more information or to make suggestions, please contact us at
https://www.cryptosys.net/contact/
| David Ireland
| DI Management Services Pty Ltd
| Australia
| <https://www.di-mgt.com.au> <https://www.cryptosys.net>
| 9 April 2023
Revision History
-----------------
6.20.0 (2023-04-09)
^^^^^^^^^^^^^^^^^^^
* First release of crsysapi.py, the Python interface to CryptoSys API v6.20.
نحوه نصب
نصب پکیج whl crsysapi-6.20.0:
pip install crsysapi-6.20.0.whl
نصب پکیج tar.gz crsysapi-6.20.0:
pip install crsysapi-6.20.0.tar.gz