Logo

上個主題

plistlib --- 生成与解析 Apple .plist 文件

下個主題

hashlib --- 安全哈希与消息摘要

本頁

  • 回報錯誤
  • 顯示原始碼

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • python logo
  • Python »
  • 3.9.23 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • |

加密服务¶

本章中描述的模块实现了加密性质的各种算法。 它们可以在安装时自行选择。 在 Unix 系统上,crypt 模块也可以使用。 以下是为内容概要:

  • hashlib --- 安全哈希与消息摘要
    • 哈希算法
    • SHAKE 可变长度摘要
    • 密钥派生
    • BLAKE2
      • 创建哈希对象
      • 常数
      • 示例
        • 简单哈希
        • 使用不同的摘要大小
        • 密钥哈希
        • 随机哈希
        • 个性化
        • 树形模式
      • 开发人员
  • hmac --- 基于密钥的消息验证
  • secrets --- 產生用於管理機密的安全亂數
    • 亂數
    • 產生權杖(token)
      • 權杖應當使用多少個位元組?
    • 其他函式
    • 應用技巧和典範實務(best practices)

上個主題

plistlib --- 生成与解析 Apple .plist 文件

下個主題

hashlib --- 安全哈希与消息摘要

本頁

  • 回報錯誤
  • 顯示原始碼

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • python logo
  • Python »
  • 3.9.23 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • |
© 版權所有 2001-2025, Python Software Foundation.
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.

The Python Software Foundation is a non-profit corporation. Please donate.

最後更新於 7月 09, 2025。 Found a bug?
Created using Sphinx 2.4.4.