What is pycryptodomex and how does it differ from pycryptodome?

99封情书 提交于 2019-12-04 03:57:17
Emmanuel Ferran

It's the same code, just different names.

  • pycryptodome has some association to pyCrypto and can be considered a drop in replacement when migrating from PyCrypto to PyCryptodome.

  • pycryptodomex is a standalone version of PyCryptodome with a different naming convention; instead of the package Crypto, you have to use Cryptodome. In the case that PyCrypto is required for legacy purposes, pycryptodome should be used.

Per the 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 PyCryptodome can coexist.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!