8000 Merge pull request #992 from jul/patch-2 · angellmethod/python-guide@7dc0ecd · GitHub
[go: up one dir, main page]

Skip to content

Commit 7dc0ecd

Browse files
authored
Merge pull request realpython#992 from jul/patch-2
The pycrypto package is no longer maintained.
2 parents 219301b + 9523ee5 commit 7dc0ecd

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

docs/scenarios/crypto.rst

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -89,34 +89,3 @@ Example
8989
print("Hang on ... did you say *all* of GnuPG? Yep.")
9090
else:
9191
pass
92-
93-
94-
95-
********
96-
PyCrypto
97-
********
98-
99-
`PyCrypto <https://www.dlitz.net/software/pycrypto/>`_ is another library,
100-
which provides secure hash functions and various encryption algorithms. It
101-
supports Python version 2.1 through 3.3.
102-
103-
Installation
104-
~~~~~~~~~~~~
105-
106-
.. code-block:: console
107-
108-
$ pip install pycrypto
109-
110-
Example
111-
~~~~~~~
112-
113-
.. code-block:: python
114-
115-
from Crypto.Cipher import AES
116-
# Encryption
117-
encryption_suite = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456')
118-
cipher_text = encryption_suite.encrypt("A really secret message. Not for prying eyes.")
119-
120-
# Decryption
121-
decryption_suite = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456')
122-
plain_text = decryption_suite.decrypt(cipher_text)

0 commit comments

Comments
 (0)
0