wolfcrypt


Namewolfcrypt JSON
Version 5.6.6.post0 PyPI version JSON
download
home_pagehttps://github.com/wolfssl/wolfcrypt-py
SummaryPython module that encapsulates wolfSSL's crypto engine API.
upload_time2024-01-23 18:33:57
maintainer
docs_urlNone
authorwolfSSL Inc.
requires_python
licenseGPLv2 or Commercial License
keywords wolfssl wolfcrypt security cryptography
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            wolfcrypt: the wolfSSL Crypto Engine
====================================

**wolfCrypt Python**, a.k.a. ``wolfcrypt`` is a Python module that encapsulates
**wolfSSL's wolfCrypt API**.

`wolfCrypt <https://wolfssl.com/wolfSSL/Products-wolfcrypt.html>`_ is a
lightweight, portable, C-language-based crypto library
targeted at IoT, embedded, and RTOS environments primarily because of its size,
speed, and feature set. It works seamlessly in desktop, enterprise, and cloud
environments as well. It is the crypto engine behind `wolfSSL's embedded ssl
library <https://wolfssl.com/wolfSSL/Products-wolfssl.html>`_.

Compiling
---------

Windows
^^^^^^^

Install the following on Windows:

* `CMake <https://cmake.org/download/>`_
* `Git <https://git-scm.com/download/win>`_
* `Python 3.9 <https://www.python.org/downloads/windows/>`_
* `Build Tools for Visual Studio <https://visualstudio.microsoft.com/downloads/>`_. This is in the "Tools for Visual Studio" section at the bottom of the page. The "Desktop development with C++" pack is needed from the installer.

Then from the command line install tox and CFFI using:

.. code-block:: sh

   pip install tox cffi

You can then build the source distribution packages using:

.. code-block:: sh

   python setup.py sdist


Linux
^^^^^

The `setup.py` file covers most things you will need to do to build and install from source. As pre-requisites you will need to install either from your OS repository or pip. You'll also need the Python development package for your Python version:

* `cffi`
* `tox`
* `pytest`

To build a source package run `python setup.py sdist`, to build a wheel package run `python setup.py bdist_wheel`. To test the build run `tox`. The `tox` tests rely on Python 3.9 being installed, if you do not have this version we recommend using `pyenv` to install it.

Installation
------------

We provide Python wheels (prebuilt binaries) for OSX 64 bits and Linux 64 bits:

.. code-block:: bash

    $ pip install wolfcrypt

To build wolfcrypt-py against a local installation of the native C wolfSSL
library, use the USE_LOCAL_WOLFSSL variable.  This variable should be

wolfcrypt-py can be built against a local version of the native wolfSSL
library by using pip with the USE_LOCAL_WOLFSSL variable. USE_LOCAL_WOLFSSL
should be set equal to the installation path for the wolfSSL library:

.. code-block:: bash

    $ USE_LOCAL_WOLFSSL=/path/to/wolfssl/install pip install .

If building wolfcrypt-py against a local wolfSSL library, wolfcrypt-py
will attempt to do native feature detection to enable/disable wolfcrypt-py
features based on how native wolfSSL has been compiled.  It uses the
<wolfssl/options.h> header to do feature detection.

Testing
-------

.. code-block:: python

    >>> from wolfcrypt.hashes import Sha256
    >>> Sha256('wolfcrypt').hexdigest()
    b'96e02e7b1cbcd6f104fe1fdb4652027a5505b68652b70095c6318f9dce0d1844'

Testing ``wolfcrypt``'s source code with ``tox``
------------------------------------------------

To run the unit tests in the source code, you'll need ``tox`` and a few other
requirements.

1. Make sure that the testing requirements are installed:

.. code-block:: console

    $ sudo -H pip install -r requirements/test.txt


2. Run ``tox``:

.. code-block:: console

    $ tox
    ...
    _________________________________ summary _________________________________
    py3: commands succeeded
    congratulations :)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/wolfssl/wolfcrypt-py",
    "name": "wolfcrypt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "wolfssl,wolfcrypt,security,cryptography",
    "author": "wolfSSL Inc.",
    "author_email": "info@wolfssl.com",
    "download_url": "https://files.pythonhosted.org/packages/65/c4/265ed1cbeb65f51749dea456abe9e89e3dea6f23986925f5a9bb5be44f4f/wolfcrypt-5.6.6.post0.tar.gz",
    "platform": null,
    "description": "wolfcrypt: the wolfSSL Crypto Engine\n====================================\n\n**wolfCrypt Python**, a.k.a. ``wolfcrypt`` is a Python module that encapsulates\n**wolfSSL's wolfCrypt API**.\n\n`wolfCrypt <https://wolfssl.com/wolfSSL/Products-wolfcrypt.html>`_ is a\nlightweight, portable, C-language-based crypto library\ntargeted at IoT, embedded, and RTOS environments primarily because of its size,\nspeed, and feature set. It works seamlessly in desktop, enterprise, and cloud\nenvironments as well. It is the crypto engine behind `wolfSSL's embedded ssl\nlibrary <https://wolfssl.com/wolfSSL/Products-wolfssl.html>`_.\n\nCompiling\n---------\n\nWindows\n^^^^^^^\n\nInstall the following on Windows:\n\n* `CMake <https://cmake.org/download/>`_\n* `Git <https://git-scm.com/download/win>`_\n* `Python 3.9 <https://www.python.org/downloads/windows/>`_\n* `Build Tools for Visual Studio <https://visualstudio.microsoft.com/downloads/>`_. This is in the \"Tools for Visual Studio\" section at the bottom of the page. The \"Desktop development with C++\" pack is needed from the installer.\n\nThen from the command line install tox and CFFI using:\n\n.. code-block:: sh\n\n   pip install tox cffi\n\nYou can then build the source distribution packages using:\n\n.. code-block:: sh\n\n   python setup.py sdist\n\n\nLinux\n^^^^^\n\nThe `setup.py` file covers most things you will need to do to build and install from source. As pre-requisites you will need to install either from your OS repository or pip. You'll also need the Python development package for your Python version:\n\n* `cffi`\n* `tox`\n* `pytest`\n\nTo build a source package run `python setup.py sdist`, to build a wheel package run `python setup.py bdist_wheel`. To test the build run `tox`. The `tox` tests rely on Python 3.9 being installed, if you do not have this version we recommend using `pyenv` to install it.\n\nInstallation\n------------\n\nWe provide Python wheels (prebuilt binaries) for OSX 64 bits and Linux 64 bits:\n\n.. code-block:: bash\n\n    $ pip install wolfcrypt\n\nTo build wolfcrypt-py against a local installation of the native C wolfSSL\nlibrary, use the USE_LOCAL_WOLFSSL variable.  This variable should be\n\nwolfcrypt-py can be built against a local version of the native wolfSSL\nlibrary by using pip with the USE_LOCAL_WOLFSSL variable. USE_LOCAL_WOLFSSL\nshould be set equal to the installation path for the wolfSSL library:\n\n.. code-block:: bash\n\n    $ USE_LOCAL_WOLFSSL=/path/to/wolfssl/install pip install .\n\nIf building wolfcrypt-py against a local wolfSSL library, wolfcrypt-py\nwill attempt to do native feature detection to enable/disable wolfcrypt-py\nfeatures based on how native wolfSSL has been compiled.  It uses the\n<wolfssl/options.h> header to do feature detection.\n\nTesting\n-------\n\n.. code-block:: python\n\n    >>> from wolfcrypt.hashes import Sha256\n    >>> Sha256('wolfcrypt').hexdigest()\n    b'96e02e7b1cbcd6f104fe1fdb4652027a5505b68652b70095c6318f9dce0d1844'\n\nTesting ``wolfcrypt``'s source code with ``tox``\n------------------------------------------------\n\nTo run the unit tests in the source code, you'll need ``tox`` and a few other\nrequirements.\n\n1. Make sure that the testing requirements are installed:\n\n.. code-block:: console\n\n    $ sudo -H pip install -r requirements/test.txt\n\n\n2. Run ``tox``:\n\n.. code-block:: console\n\n    $ tox\n    ...\n    _________________________________ summary _________________________________\n    py3: commands succeeded\n    congratulations :)\n",
    "bugtrack_url": null,
    "license": "GPLv2 or Commercial License",
    "summary": "Python module that encapsulates wolfSSL's crypto engine API.",
    "version": "5.6.6.post0",
    "project_urls": {
        "Homepage": "https://github.com/wolfssl/wolfcrypt-py"
    },
    "split_keywords": [
        "wolfssl",
        "wolfcrypt",
        "security",
        "cryptography"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "65c4265ed1cbeb65f51749dea456abe9e89e3dea6f23986925f5a9bb5be44f4f",
                "md5": "041923d91937010a842dbc5dcdd27776",
                "sha256": "6c9ba91aa584f847fd0a8c80438f8e3ac9a83cf7844bc56e084c0b2ee9aa2e8a"
            },
            "downloads": -1,
            "filename": "wolfcrypt-5.6.6.post0.tar.gz",
            "has_sig": false,
            "md5_digest": "041923d91937010a842dbc5dcdd27776",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 83858,
            "upload_time": "2024-01-23T18:33:57",
            "upload_time_iso_8601": "2024-01-23T18:33:57.729710Z",
            "url": "https://files.pythonhosted.org/packages/65/c4/265ed1cbeb65f51749dea456abe9e89e3dea6f23986925f5a9bb5be44f4f/wolfcrypt-5.6.6.post0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-23 18:33:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wolfssl",
    "github_project": "wolfcrypt-py",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "wolfcrypt"
}
        
Elapsed time: 0.18777s