gpt4 book ai didi

python - 什么是 pycryptodomex,它与 pycryptodome 有何不同?

转载 作者:太空狗 更新时间:2023-10-29 21:38:37 27 4
gpt4 key购买 nike

今天看到PySNMP安装了pycryptodomex。该名称中的 x 看起来可疑且令人惊讶。

我试图追踪它,但看起来 pycryptodomepycryptodomex 都属于同一个帐户并指向 same Github repository

特别是因为加密库是一项核心安全功能,所以我怀疑重复。

复制的目的是什么?我可以从开源中发现这些信息吗?

最佳答案

代码相同,只是名称不同。

  • pycryptodome 与 pyCrypto 有一些关联,可以被视为从 PyCrypto 迁移到 PyCryptodome 时的替代品。

  • pycryptodomex 是 PyCryptodome 的独立版本,具有不同的命名约定;而不是包 Crypto,您必须使用 Cryptodome。如果遗留用途需要 PyCrypto,则应使用 pycryptodome

根据 repository :

The installation procedure depends on the package you want the library in. PyCryptodome can be used as:

  1. an almost drop-in replacement for the old PyCrypto library. You install it with:

     pip install pycryptodome

    In this case, all modules are installed under the Crypto package.

    One must avoid having both PyCrypto and PyCryptodome installed at the same time, as they will interfere with each other.

    This option is therefore recommended only when you are sure that the whole application is deployed in a virtualenv.

  2. a library independent of the old PyCrypto. You install it with:

     pip install pycryptodomex

    In this case, all modules are installed under the Cryptodome package. PyCrypto and PyCryptodomex can coexist.

关于python - 什么是 pycryptodomex,它与 pycryptodome 有何不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48155294/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com