⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 python的加密库
💻
字号:
Python Cryptography Toolkit (pycrypto)======================================This is a collection of both secure hash functions (such as MD5 and SHA),and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal, etc.).  Thepackage is structured to make adding new modules easy.  I consider thissection to be essentially complete, and the software interface will almostcertainly not change in an incompatible way in the future; all that remainsto be done is to fix any bugs that show up.  If you encounter a bug, pleasereport it in the SourceForge bug tracker at       https://sourceforge.net/tracker/?group_id=20937&atid=120937  An example usage of the MD5 module is:>>> from Crypto.Hash import MD5>>> hash=MD5.new()>>> hash.update('message')>>> hash.digest()'x\xe71\x02}\x8f\xd5\x0e\xd6B4\x0b|\x9ac\xb3'An example usage of an encryption algorithm (AES, in this case) is:>>> from Crypto.Cipher import AES>>> obj=AES.new('This is a key456', AES.MODE_ECB)>>> message="The answer is no">>> ciphertext=obj.encrypt(message)>>> ciphertext'o\x1aq_{P+\xd0\x07\xce\x89\xd1=M\x989'>>> obj2 = AES.new('This is a key456', AES.MODE_ECB)>>> obj2.decrypt(ciphertext)'The answer is no'One possible application of the modules is writing secureadministration tools.  Another application is in writing daemons andservers.  Clients and servers can encrypt the data being exchanged andmutually authenticate themselves; daemons can encrypt private data foradded security.  Python also provides a pleasant framework forprototyping and experimentation with cryptographic algorithms; thanksto its arbitrary-length integers, public key algorithms are easilyimplemented.Development of the toolkit can be discussed on the pct mailing list;archives and instructions for subscribing at at <URL:http://www.amk.ca/mailman/listinfo/pct>.Installation============The toolkit is written and tested using Python 2.2, though it shouldalso work with Python 2.1.  Python 1.5.2 is not supported, and thesetup.py script will abort if you run it with 1.5.2.The modules are packaged using the Distutils, so you can simply run"python setup.py build" to build the package, and "python setup.pyinstall" to install it.If the setup.py script crashes with a DistutilsPlatformErrorcomplaining that the file /usr/lib/python2.2/config/Makefile doesn'texist, this means that the files needed for compiling new Pythonmodules aren't installed on your system.  Red Hat users often run intothis because they don't have the python2-devel RPM installed.  The fixis to simply install the requisite RPM.To verify that everything is in order, run "python test.py".  It will testall the cryptographic modules, skipping ones that aren't available.  If thetest script reports an error on your machine, please report the bug usingthe bug tracker (URL given above).  If possible, track down the bug andinclude a patch that fixes it.To install the package under the site-packages directory ofyour Python installation, run "python setup.py install".If you have any comments, corrections, or improvements for this package,please send it to the 'pct' mailing list.  Good luck!--amk                                                       (www.amk.ca)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -