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')

最新文章

  1. XPath 学习二: 语法
  2. jQuery瀑布流
  3. C# Redis消息队列例子
  4. Oracle11安装
  5. 连接mysql问题 mysqlnd cannot connect to MySQL 4.1+ using old authentication
  6. c++算法应用 预备
  7. ref和out的区别,值类型和引用类型的使用
  8. [spring]启动时报错:NoSuchMethodError: javax.servlet.http.HttpServletResponse.getStatus()I
  9. Go语言博客
  10. 【HDOJ】1914 The Stable Marriage Problem
  11. encode_json 会对给定的Perl的数据结构转换为一个UTF-8 encoded, binary string.
  12. JQuery autocomplete获得焦点触发弹出下拉框
  13. 牛客练习赛41 B-666RPG
  14. poj3080(kmp+枚举)
  15. 如何判断事务是否完成,SqlTransaction
  16. spring远程服务知识梳理
  17. linux系统host修改
  18. baseCss/resetCss(转)
  19. MySQL监控内容
  20. 在编写异步方法时,使用 ConfigureAwait(false) 避免使用者死锁

热门文章

  1. ngx.shared.DICT.incr 详解
  2. O(n) O(log n) blist: an asymptotically faster list-like type for Python
  3. C++在线编程网站
  4. [Java复习] 分布式锁 Zookeeper Redis
  5. ISO/IEC 9899:2011 条款6.2.6——类型的表示
  6. MERN——MongoDB && React && Node && Express
  7. Qt编写数据导出到Excel及Pdf和打印数据
  8. 使用python3脚本部署mariadb主从架构
  9. Spring Boot学习笔记——Spring Boot与ActiveMQ的集成
  10. ubuntu18.04 server配置静态ip,新的网络工具netplan的使用方法【转:http://forum.ubuntu.org.cn/viewtopic.php?t=487463】