I am using windows 8 and python 3.6.1 I've done the following command in my cmd:
pip install cryptoshop
However, when I run the following python code:
from cryptoshop import encryptfile
from cryptoshop import decryptfile
result1 = encryptfile(filename="test", passphrase="mypassphrase", algo="srp")
print(result1)
result2 = decryptfile(filename="test.cryptoshop", passphrase="mypassphrase")
print(result2)
I get the following error:
Traceback (most recent call last): File "C:/Users/Owner/Desktop/test.py", line 1, in from cryptoshop import encryptfile File "C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\cryptoshop__init__.py", line 26, in from cryptoshop.cryptoshop import encryptfile File "C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\cryptoshop\cryptoshop.py", line 56, in from ._cascade_engine import encry_decry_cascade File "C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\cryptoshop_cascade_engine.py", line 27, in from ._nonce_engine import generate_nonce_timestamp File "C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\cryptoshop_nonce_engine.py", line 39, in import botan ModuleNotFoundError: No module named 'botan'
Now, I obviously know that you must install botan into python in order to use it. However, this is where I am running into an issue. I've downloaded Botan from this link as instructed:
https://github.com/randombit/botan
And then I've followed these instructions in an attempt to install Botan:
./configure.py [--prefix=/some/directory]
make
make install
However, when I type make into the command line I get an error saying there is no such command. And then when I go to run my above Python code I still get the no module Botan error. So obviously I am doing something run. How can I properly install Botan into my Python 3.6 directories so that I can use cryptoshop.
I've also attempted to do pip install Botan, as that is how I've installed so many other python libraries but that has been unsuccessful as well.
make
is a linux commandAccording to the
botan
website you can usenmake
as a replacement on windows ( http://wiki.c2.com/?UsingNmake ) :source : https://botan.randombit.net/manual/building.html
For completeness, here's how I made it work on a Mac
Assuming you have
brew
installed.You may need to install other functionality first:
Find out where botan got installed with
brew info botan
. My location is/usr/local/Cellar/botan/2.6.0
In that folder, you'll find
lib/python2.7/site-packages
, copy the contents of this folder into your Python's installationsite-packages
folder.Note 1: At the time of this writing, only python 2.7 seems to be supported, but I'm using python 3.6 and everything seems to be working.
Note 2: If the file is called
botan2.py
, you may need to rename it tobotan.py
in your python'ssite-packages
folder.