推荐学习书目
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
JackyXiong
V2EX  ›  Python

python,数据加密。

  •  
  •   JackyXiong ·
    JackyXiong · Dec 1, 2014 · 3499 views
    This topic created in 4224 days ago, the information mentioned may be changed or developed.
    如题,在 Python 里怎么对两个字符串进行异或加密?
    如 s1='abc', s2='def',php可以直接s1^s2,Python 怎么来加密呢?
    4 replies    2014-12-02 10:05:57 +08:00
    heqing
        1
    heqing  
       Dec 1, 2014
    [ord(a) ^ ord(b) for a,b in zip(s1,s2)]
    imn1
        3
    imn1  
       Dec 1, 2014
    @heqing
    不用再转回字串/bytes么?
    yueyoum
        4
    yueyoum  
       Dec 2, 2014
    加密这种需求,就别自己实现了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1174 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 23:29 · PVG 07:29 · LAX 16:29 · JFK 19:29
    ♥ Do have faith in what you're doing.