就业培训     下载中心     Wiki     联络
登录   注册

Log
  1. 首页
  2. Python 3.13.1
  3. 上一话题

    plistlib — 生成和剖析 Apple .plist 文件

    下一话题

    hashlib — 安全哈希和消息摘要

    本页

    • 报告 Bug
    • 展示源

Navigation

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

加密服务 ¶

The modules described in this chapter implement various algorithms of a cryptographic nature. They are available at the discretion of the installation. Here’s an overview:

  • hashlib — 安全哈希和消息摘要
    • 哈希算法
    • 用法
    • 构造函数
      • new()
      • md5()
      • sha1()
      • sha224()
      • sha256()
      • sha384()
      • sha512()
      • sha3_224()
      • sha3_256()
      • sha3_384()
      • sha3_512()
    • 属性
      • algorithms_guaranteed
      • algorithms_available
    • Hash Objects
      • 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_bytes()
      • token_hex()
      • token_urlsafe()
      • 令牌应使用多少字节?
    • 其它函数
      • compare_digest()
    • 配方和最佳实践

上一话题

plistlib — 生成和剖析 Apple .plist 文件

下一话题

hashlib — 安全哈希和消息摘要

本页

  • 报告 Bug
  • 展示源
«

Navigation

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

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1