推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
beyond111
V2EX  ›  Python

求助 用 Python 进行明文加密解密!

  •  
  •   beyond111 · Oct 17, 2018 · 4115 views
    This topic created in 2905 days ago, the information mentioned may be changed or developed.
    公司做个项目 其中一个模块要求是 进行明文加密 就是 输入一段明文字符 设定长度不限 输出是哈希 256 加密 秘钥。
    求助 大神代码或者算法
    6 replies  •  2018-10-19 09:27:28 +08:00
    fanshutailang
        1
    fanshutailang  
       Oct 17, 2018
    johnj
        2
    johnj  
       Oct 17, 2018
    你这不像是加密需求 而是哈希需求吧
    alixali
        3
    alixali  
       Oct 17, 2018
    sha256
    alixali
        4
    alixali  
       Oct 17, 2018
    或者 DES 协商密钥,这个密文可以解开。
    lolizeppelin
        5
    lolizeppelin  
       Oct 18, 2018 via Android
    fernet token 试试 嘿嘿
    当然明文太长就不行
    simonliu2018
        6
    simonliu2018  
       Oct 19, 2018
    >哈希 256 加密 秘钥
    完全看不懂。
    哈希 256 是想表达 SHA256 吗?

    加密对应解密,明文对应密文。加密算法(明文,密钥) => 密文;解密算法(密文,密钥) => 明文。
    数据 HASH 的结果是数字摘要。比如 SHA256('hello') => 2cf24dba5fb0a....3362938b9824
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4654 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 08:49 · PVG 16:49 · LAX 01:49 · JFK 04:49
    ♥ Do have faith in what you're doing.