Logo

Previous topic上一个主题

plistlib — Generate and parse Apple .plist files

Next topic下一个主题

hashlib — Secure hashes and message digests

Navigation导航

  • index索引
  • modules模块 |
  • next下一主题 |
  • previous上一主题 |
  • python logo
  • Python »
  • 3.10.4 Documentation文档 »
  • The Python Standard LibraryPython标准库 »
  • Cryptographic Services加密服务
  • |

Cryptographic Services加密服务¶

The modules described in this chapter implement various algorithms of a cryptographic nature. 本章描述的模块实现各种密码性质的算法。They are available at the discretion of the installation. 可根据安装情况自行决定。On Unix systems, the crypt module may also be available. Here’s an overview:在Unix系统上,还可以使用crypt模块。以下是概述:

  • hashlib — Secure hashes and message digests安全哈希和消息摘要
    • Hash algorithms哈希算法
    • SHAKE variable length digests摇动可变长度摘要
    • Key derivation导出密钥
    • BLAKE2
      • Creating hash objects创建哈希对象
      • Constants常量
      • Examples示例
        • Simple hashing简单哈希
        • Using different digest sizes使用不同的摘要大小
        • Keyed hashing键控哈希
        • Randomized hashing随机哈希
        • Personalization个性化
        • Tree mode树模式
      • Credits信用
  • hmac — Keyed-Hashing for Message Authentication用于消息身份验证的密钥哈希
  • secrets — Generate secure random numbers for managing secrets生成用于管理机密的安全随机数
    • Random numbers随机数
    • Generating tokens生成令牌
      • How many bytes should tokens use?令牌应该使用多少字节?
    • Other functions其他功能
    • Recipes and best practices配方和最佳实践

Previous topic上一个主题

plistlib — Generate and parse Apple .plist files

Next topic下一个主题

hashlib — Secure hashes and message digests