什么是pycryptodomex,它与pycryptodome有何不同? [英] What is pycryptodomex and how does it differ from pycryptodome?

查看:1757
本文介绍了什么是pycryptodomex,它与pycryptodome有何不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我看到PySNMP正在安装pycryptodomex.该名称中的x看起来可疑且令人惊讶.

Today I saw PySNMP installing pycryptodomex. The x in that name looked suspicious and surprising.

我试图对其进行跟踪,但是它看起来像 pycryptodome 相同的Github存储库.

I tried to track it down, but it looks like both pycryptodome and pycryptodomex are owned by the same account and point back to the same Github repository.

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

Especially because a cryptography library is a core security feature, I'm suspicious of the duplication.

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

What's the purpose of this duplication? Could I have discovered this information from open sources?

推荐答案

这是相同的代码,只是名称不同.

It's the same code, just different names.

  • pycryptodome与pyCrypto有一些关联,在从PyCrypto迁移到PyCryptodome时,可以认为是替代品的下降.

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

pycryptodomex是PyCryptodome的独立版本,具有不同的命名约定.而不是包Crypto,您必须使用Cryptodome.如果出于传统目的需要PyCrypto,则应使用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.

根据存储库:

安装过程取决于您要在其中安装库的软件包.PyCryptodome可以用作:

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

  1. 几乎是旧PyCrypto库的直接替代品.您可以通过以下方式安装它:

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

 pip install pycryptodome

在这种情况下,所有模块都安装在Crypto软件包下.

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

必须避免同时安装PyCrypto和PyCryptodome,因为它们会相互干扰.

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

因此,仅当您确定整个应用程序都已部署在virtualenv中时,才建议使用此选项.

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

独立于旧版PyCrypto的库.您可以通过以下方式安装它:

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

 pip install pycryptodomex

在这种情况下,所有模块都安装在Cryptodome软件包下. PyCrypto和PyCryptodome可以共存.

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

这篇关于什么是pycryptodomex,它与pycryptodome有何不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆