Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9523ee5

Browse filesBrowse files
authored
you don't let friends use pycrypto
Unmaintained package with CVE might not be a good help https://www.cvedetails.com/product/22441/Dlitz-Pycrypto.html?vendor_id=11993 I also share the opinion of the author that pycrypto and its fork may promote insecure usage (like AES::ECB) https://theartofmachinery.com/2017/02/02/dont_use_pycrypto.html
1 parent ad05712 commit 9523ee5
Copy full SHA for 9523ee5

File tree

Expand file treeCollapse file tree

1 file changed

+0
-31
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-31
lines changed

‎docs/scenarios/crypto.rst

Copy file name to clipboardExpand all lines: docs/scenarios/crypto.rst
-31Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.