1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00
Files
wolfssl/wrapper/python
2016-05-16 20:37:42 -03:00
..
2016-05-09 18:46:01 -03:00
2016-05-03 00:49:56 -03:00
2016-05-03 00:49:56 -03:00
2016-05-09 18:46:01 -03:00
2016-05-04 21:38:27 -03:00
2016-05-16 20:13:26 -03:00
2016-05-09 15:25:18 -03:00
2016-05-15 15:08:16 -03:00

wolfcrypt: the wolfSSL Crypto Engine

wolfCrypt Python, a.k.a. wolfcrypt is a Python library that encapsulates wolfSSL's wolfCrypt API.

wolfCrypt 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.

Installation

You can install wolfcrypt via pip or source code, but before installing it, make sure you have wolfssl C library installed in your machine.

Linux ONLY: Make sure you have python-dev, python3-dev, python-pip and libffi-dev installed:

$ sudo apt-get update
$ sudo apt-get install python-dev python3-dev python-pip libffi-dev

To install wolfssl do:

$ git clone git@github.com:wolfssl/wolfssl.git
$ cd wolfssl
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

Linux ONLY: Update your dynamic linker bindings with:

$ sudo ldconfig

# or

$ export LD_LIBRARY_PATH=/usr/local/lib

wolfcrypt pip installation

To install wolfcrypt with pip:

$ pip install wolfcrypt

or if you need admin privileges to use pip:

$ sudo -H pip install wolfcrypt

wolfcrypt source installation

To install wolfcrypt from sources:

  1. Get the sources:
$ git clone git@github.com:wolfssl/wolfssl.git
$ cd wolfssl/wrapper/python
  1. Build and install wolfcrypt
$ python setup.py install
...
Finished processing dependencies for wolfcrypt...

or if you need admin privileges to use the install command:

$ sudo python setup.py install

Testing

Test wolfcrypt locally with tox:

  1. Make sure that the testing requirements are installed:
$ pip install -r requirements-testing.txt

or if you need admin privileges to use the install command:

$ sudo -H pip install -r requirements-testing.txt
  1. Call tox:
$ tox
...
_________________________________ summary _________________________________
py27: commands succeeded
SKIPPED: py34: InterpreterNotFound: python3.4
py35: commands succeeded
congratulations :)

Note that some tests might be skipped if you don't have the proper interpreter.