Python logo

上個主題

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

下個主題

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

此頁面

  • 回報錯誤
  • 顯示原始碼

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.11.12 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • 加密服務
  • |
  • |

加密服務¶

本章所描述的模組 (module) 實作了多種加密演算法。它們可以在安裝時選擇是否一同安裝。在 Unix 系統上,crypt 模組也有機會能夠被使用。以下為概述:

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

上個主題

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

下個主題

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

此頁面

  • 回報錯誤
  • 顯示原始碼
«

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • Python logo
  • Python »
  • 3.11.12 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.

最後更新於 Apr 12, 2025 (02:23 UTC)。 Found a bug?
使用 Sphinx 7.2.6 建立。