PyCryptodome安装使用方法
2024-10-06 09:19:43
PyCryptodome是PyCrypto的一个分支。基于PyCrypto2.6.1,多了以下特性:
- Authenticated encryption modes (GCM, CCM, EAX, SIV)
- Accelerated AES on Intel platforms via AES-NI
- First class support for PyPy
- SHA-3 hash algorithm
- Salsa20 stream cipher
- scrypt and HKDF
- Deterministic DSA
- Password-protected PKCS#8 key containers
- Shamir’s Secret Sharing scheme
- Random numbers get sourced directly from the OS (and not from a CSPRNG in userspace)
- Simplified install process, including better support for Windows
- Cleaner RSA and DSA key generation (largely based on FIPS 186-4)
- Major clean ups and simplification of the code base
官方文档:Compatibility with PyCrypto
------------------
0x01 安装
pip install PyCryptodome
0x02 使用
跟PyCrypto2.6用法类似,以下以AES为例:
from Crypto.Cipher import AES
key='1234567890abcdef'
obj=AES.new(key,AES.MODE_ECB)
cipher=obj.encrypt('message: pcat.cc')
最新文章
- XPath 学习二: 语法
- jQuery瀑布流
- C# Redis消息队列例子
- Oracle11安装
- 连接mysql问题 mysqlnd cannot connect to MySQL 4.1+ using old authentication
- c++算法应用 预备
- ref和out的区别,值类型和引用类型的使用
- [spring]启动时报错:NoSuchMethodError: javax.servlet.http.HttpServletResponse.getStatus()I
- Go语言博客
- 【HDOJ】1914 The Stable Marriage Problem
- encode_json 会对给定的Perl的数据结构转换为一个UTF-8 encoded, binary string.
- JQuery autocomplete获得焦点触发弹出下拉框
- 牛客练习赛41 B-666RPG
- poj3080(kmp+枚举)
- 如何判断事务是否完成,SqlTransaction
- spring远程服务知识梳理
- linux系统host修改
- baseCss/resetCss(转)
- MySQL监控内容
- 在编写异步方法时,使用 ConfigureAwait(false) 避免使用者死锁
热门文章
- ngx.shared.DICT.incr 详解
- O(n) O(log n) blist: an asymptotically faster list-like type for Python
- C++在线编程网站
- [Java复习] 分布式锁 Zookeeper Redis
- ISO/IEC 9899:2011 条款6.2.6——类型的表示
- MERN——MongoDB &;&; React &;&; Node &;&; Express
- Qt编写数据导出到Excel及Pdf和打印数据
- 使用python3脚本部署mariadb主从架构
- Spring Boot学习笔记——Spring Boot与ActiveMQ的集成
- ubuntu18.04 server配置静态ip,新的网络工具netplan的使用方法【转:http://forum.ubuntu.org.cn/viewtopic.php?t=487463】