- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用 windows 8 和 python 3.6.1 我在我的 cmd 中完成了以下命令:
pip 安装加密商店
但是,当我运行以下 python 代码时:
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)
我收到以下错误:
追溯(最近的调用最后): 文件“C:/Users/Owner/Desktop/test.py”,第 1 行,位于 从 cryptoshop 导入加密文件 文件“C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\cryptoshop__init__.py”,第 26 行,在 从 cryptoshop.cryptoshop 导入加密文件 文件“C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\cryptoshop\cryptoshop.py”,第 56 行,在 从 ._cascade_engine 导入 encry_decry_cascade 文件“C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\cryptoshop_cascade_engine.py”,第 27 行,在 从 ._nonce_engine 导入 generate_nonce_timestamp 文件“C:\Users\Owner\AppData\Local\Programs\Python\Python36-32\lib\site-packages\cryptoshop_nonce_engine.py”,第 39 行,在 进口牡丹ModuleNotFoundError: 没有名为“botan”的模块
现在,我显然知道您必须将 botan 安装到 python 中才能使用它。但是,这是我遇到问题的地方。我已按照说明从此链接下载了 Botan:
https://github.com/randombit/botan
然后我按照这些说明尝试安装 Botan:
./configure.py [--prefix=/some/directory]
make
make install
但是,当我在命令行中键入 make 时,我收到一条错误消息,指出没有这样的命令。然后当我去运行上面的 Python 代码时,我仍然得到 no module Botan 错误。所以很明显我正在做一些事情。如何将 Botan 正确安装到我的 Python 3.6 目录中,以便我可以使用 cryptoshop。
我也尝试过 pip install Botan,因为这就是我安装这么多其他 python 库的方式,但也没有成功。
最佳答案
make
是一个 linux 命令
根据 botan
网站,您可以使用 nmake
作为 Windows (http://wiki.c2.com/?UsingNmake) 的替代品:
On Windows
You need to have a copy of Python installed, and have both Python and your chosen compiler in your path. Open a command shell (or the SDK shell), and run:
$ python configure.py --cc=msvc (or --cc=gcc for MinGW) [--cpu=CPU]
$ nmake
$ botan-test.exe
$ nmake install
Botan supports the nmake replacement Jom which enables you to run multiple build jobs in parallel.
关于python - 我该如何解决问题 "No module name Botan",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46551943/
我从 this answer 那里得到了很好的建议, 检查 the file list for libbotan1.10-dev 并找到/usr/lib/libbotan-1.10.a ,所以我使用了
我使用 创建了一个新的 key 对 Botan::EC_Group ecgroup("brainpool512r1"); Botan::ECDH_PrivateKey privKey(CBot
我正在使用 Botan 创建公共(public)/私有(private) ECDSA key 对。生成的公钥(即使在使用此代码的不同机器上)非常相似......我认为太相似而无法考虑安全。以下是两次运
我正在使用名为 Botan 的 c++ 加密库,并且在任意时间我在运行时收到以下错误。这是什么意思? terminate called after throwing an instance of 'B
我正在尝试使用 Botan 的函数 generate_bcrypt() 获取密码的哈希值。 我读了手册http://botan.randombit.net/passhash.html这里。后来我又读了
我用过Botan::TLS::Callbacks还有Botan::TLS::Client Botan::TLS::Server为了在客户端和服务器之间获得安全通道。同样为了加密解密数据,我使用了 和
在以下单元测试中使用 Botan::SecureVector 时: void UnitTest() { std::vector vbData; vbData.push_back(0x0
我正在尝试使用 botan 加密库运行最基本的程序。我正在使用 Botan 1.10 32 位。我在 Windows 7 上获得了带有安装程序的二进制文件。IDE 是 Visual Studio 20
有谁知道如何创建类型为 Botan::MemoryRegion 的对象以用于此方法? BigInt BOTAN_DLL fe1_encrypt(const BigInt& n, const BigIn
我只是尝试初始化Botan AutoSeeded_RNG,但由于引用错误而失败。我只是想测试一下是否可以初始化任何种类的Botan RNG,因为我在另一个项目中遇到了麻烦。 我包含正确的 header
我使用 vcpkg 作为我的包管理器,按照示例很容易构建 example用sqlite。 之后我成功安装了 botan 并尝试使用find_package(botan REQUIRED) 如示例所示
我有一个与此类似的 C++ 代码: Botan::AutoSeeded_RNG botan_rng; Botan::RSA_PrivateKey private_key(botan_rng, 2048
我开始使用 botan 密码库,我遇到了一个奇怪的函数签名: /** * Load an encrypted key from a data source. * @param source the d
我正在使用 Botan C++ 库来签署和验证一些 license.ini 文件。我已将 Botan PK_Signer 设置为使用 RSA 算法来加密使用 PKCS v1.5 创建的散列。这是我的代
Botan 是否支持 EC 公钥的“压缩”表示的序列化/反序列化? (只有 EC + 号上点的 X 坐标)。有什么例子吗? 最佳答案 是的。 Botan 默认压缩 ECC 点,例如在将公钥序列化为 X
我正在使用 windows 8 和 python 3.6.1 我在我的 cmd 中完成了以下命令: pip 安装加密商店 但是,当我运行以下 python 代码时: from cryptoshop i
我正在尝试使用 Botan 库与私有(private)证书建立 SSL/TLS 连接。不幸的是,我找不到任何使用新 TLS::Client 类的实际示例代码。该文档只是 doxygen 文档的更多文本
我正在尝试构建一个链接到 Botan 1.11 的库。我使用 configure.py 生成合并并将其包含在我的项目中。 问题是当我尝试构建项目时出现以下错误: /Applications/Xcode
我对来自 Botan 加密库的 c++ mc-eliece 实现有问题。在整个互联网上似乎几乎只有一个例子,并带有指向它的链接。 https://www.cryptosource.de/docs/mc
我在 Qt 中使用 Botan 库进行加密。我让它工作到我可以从一个文件加密和解密到另一个文件的地方,但我试图改变它以从一个文件加密到一个 QDomDocument(加密文件将只是一个 XML 文件)
我是一名优秀的程序员,十分优秀!