wolfCrypt Python, a.k.a. wolfcrypt is a Python library that encapsulates
wolfSSL's wolfCrypt API.
wolfSSl's embedded ssl library.
In order to use wolfcrypt, first you'll need to install wolfssl C
embedded ssl library.
wolfssl :Mac OSX
brew install wolfssl
or
git clone https://github.com/wolfssl/wolfssl.git
cd wolfssl/
./autogen.sh
./configure --enable-sha512
make
sudo make install
Ubuntu
sudo apt-get update
sudo apt-get install -y git autoconf libtool
git clone https://github.com/wolfssl/wolfssl.git
cd wolfssl/
./autogen.sh
./configure --enable-sha512
make
sudo make install
sudo ldconfig
CentOS
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm
sudo yum update
sudo yum install -y git autoconf libtool
git clone git@github.com:wolfssl/wolfssl.git
cd wolfssl
./autogen.sh
./configure --enable-sha512
make
sudo make install
echo /usr/local/lib > wolfssl.conf
sudo mv wolfssl.conf /etc/ld.so.conf
sudo ldconfig
wolfcrypt :Mac OSX
sudo -H pip install wolfcrypt
Ubuntu
sudo apt-get install -y python-dev python3-dev python-pip libffi-dev
sudo -H pip install wolfcrypt
CentOS
sudo yum install -y python-devel python3-devel python-pip libffi-devel
sudo -H pip install wolfcrypt
wolfcrypt :
python -c "from wolfcrypt.hashes import Sha; print Sha().hexdigest()"
expected output: da39a3ee5e6b4b0d3255bfef95601890afd80709
wolfcrypt's source code with tox :To run the unit tests in the source code, you'll need tox and a few other
requirements. The source code relies at 'WOLFSSL_DIR/wrapper/python/wolfcrypt'
where WOLFSSL_DIR is the path of wolfssl's source code.
$ sudo -H pip install -r requirements-testing.txt
tox:
$ tox
...
_________________________________ summary _________________________________
py27: commands succeeded
SKIPPED: py34: InterpreterNotFound: python3.4
py35: commands succeeded
congratulations :)
Note: the test is performed using multiple versions of python. If you are missing a version the test will be skipped with an InterpreterNotFound error.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。