Python logo

上一主题

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

下一主题

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

当前页

  • 报告 Bug
  • 显示源码

导航

  • 索引
  • 模块 |
  • 下一页 |
  • 上一页 |
  • Python logo
  • Python »
  • 3.13.1 Documentation »
  • Python 标准库 »
  • 加密服务
  • |
  • |

加密服务¶

本章中介绍的模块实现了多种加密性质的算法。 它们可在安装时选择使用。 以下是内容概要:

  • hashlib --- 安全哈希与消息摘要
    • 哈希算法
    • 用法
    • 构造器
      • new()
      • md5()
      • sha1()
      • sha224()
      • sha256()
      • sha384()
      • sha512()
      • sha3_224()
      • sha3_256()
      • sha3_384()
      • sha3_512()
    • 属性
      • algorithms_guaranteed
      • algorithms_available
    • 哈希对象
      • digest_size
      • block_size
      • name
      • update()
      • digest()
      • hexdigest()
      • copy()
    • SHAKE 可变长度摘要
      • shake_128()
      • shake_256()
      • digest()
      • hexdigest()
    • 文件哈希
      • file_digest()
    • 密钥派生
      • pbkdf2_hmac()
      • scrypt()
    • BLAKE2
      • 创建哈希对象
        • blake2b()
        • blake2s()
      • 常量
        • SALT_SIZE
        • SALT_SIZE
        • PERSON_SIZE
        • PERSON_SIZE
        • MAX_KEY_SIZE
        • MAX_KEY_SIZE
        • MAX_DIGEST_SIZE
        • MAX_DIGEST_SIZE
      • 例子
        • 简单哈希
        • 使用不同的摘要大小
        • 密钥哈希
        • 随机哈希
        • 个性化
        • 树形模式
      • 开发人员
  • hmac --- 用于消息验证的密钥哈希
    • new()
    • digest()
    • update()
    • digest()
    • hexdigest()
    • copy()
    • digest_size
    • block_size
    • name
    • compare_digest()
  • secrets --- 生成管理密码的安全随机数
    • 随机数
      • SystemRandom
      • choice()
      • randbelow()
      • randbits()
    • 生成 Token
      • token_bytes()
      • token_hex()
      • token_urlsafe()
      • Token 应当使用多少个字节?
    • 其他功能
      • compare_digest()
    • 应用技巧与最佳实践

上一主题

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

下一主题

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

当前页

  • 报告 Bug
  • 显示源码
«

导航

  • 索引
  • 模块 |
  • 下一页 |
  • 上一页 |
  • Python logo
  • Python »
  • 3.13.1 Documentation »
  • Python 标准库 »
  • 加密服务
  • |
  • |
© 版权所有 2001-2024, 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.

最后更新于 12月 06, 2024 (06:47 UTC). Found a bug?
由 Sphinx 8.1.3创建。