Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 511492 Details for
Bug 611608
dev-python/potr: support dev-python/pycryptodome
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch for pycryptodome compatibility and doc updates
pycryptodome.patch (text/plain), 3.04 KB, created by
Daniel Robbins
on 2017-12-22 20:58:23 UTC
(
hide
)
Description:
A patch for pycryptodome compatibility and doc updates
Filename:
MIME Type:
Creator:
Daniel Robbins
Created:
2017-12-22 20:58:23 UTC
Size:
3.04 KB
patch
obsolete
>diff --git a/.travis.yml b/.travis.yml >index f55afe3..63e397d 100644 >--- a/.travis.yml >+++ b/.travis.yml >@@ -2,5 +2,6 @@ language: python > python: > - '2.7' > - '3.5' >+ - '3.6' > install: 'pip install -r requirements.txt -r test-requirements.txt' > script: ./run_tests.sh >diff --git a/README.md b/README.md >index c6df1e1..5d340da 100644 >--- a/README.md >+++ b/README.md >@@ -8,14 +8,14 @@ Install the potr Python module: > > sudo python setup.py install > >-__Dependencies__: pycrypto >= 2.1 (see [dlitz/pycrypto](https://github.com/dlitz/pycrypto)) >+__Dependencies__: pycryptodome > > This software is experimental and potentially insecure. Do not rely on it > ========================================================================= > > Usage Notes > =========== >-This module uses pycrypto's RNG. If you use this package in your application and your application >+This module uses pycryptodome's RNG. If you use this package in your application and your application > uses `os.fork()`, make sure to call `Crypto.Random.atfork()` in both the parent and the child process. > > Reporting bugs >diff --git a/requirements.txt b/requirements.txt >index 03917ad..acdfd20 100644 >--- a/requirements.txt >+++ b/requirements.txt >@@ -1 +1 @@ >-PyCrypto >= 2.1 >+pycryptodome >diff --git a/setup.py b/setup.py >index dd9bcb0..178660e 100644 >--- a/setup.py >+++ b/setup.py >@@ -22,7 +22,7 @@ try: > > from setuptools.command.install_lib import install_lib > >- args['install_requires']=['pycrypto>=2.1'] >+ args['install_requires']=['pycryptodome'] > except ImportError: > print('\n*** setuptools not found! Falling back to distutils\n\n') > from distutils.core import setup >@@ -45,11 +45,11 @@ Install the potr Python module: > > sudo python setup.py install > >-**Dependencies**: pycrypto >= 2.1 (see `dlitz/pycrypto <https://github.com/dlitz/pycrypto>`_) >+**Dependencies**: pycryptodome > > Usage Notes > =========== >-This module uses pycrypto's RNG. If you use this package in your application and your application >+This module uses pycryptodomes's RNG. If you use this package in your application and your application > uses ``os.fork()``, make sure to call ``Crypto.Random.atfork()`` in both the parent and the child process. > > Reporting bugs >diff --git a/src/potr/compatcrypto/pycrypto.py b/src/potr/compatcrypto/pycrypto.py >index e2cba50..38612f8 100644 >--- a/src/potr/compatcrypto/pycrypto.py >+++ b/src/potr/compatcrypto/pycrypto.py >@@ -15,7 +15,7 @@ > # You should have received a copy of the GNU Lesser General Public License > # along with this library. If not, see <http://www.gnu.org/licenses/>. > >-from Crypto import Cipher >+from Crypto.Cipher import AES > from Crypto.Hash import SHA256 as _SHA256 > from Crypto.Hash import SHA as _SHA1 > from Crypto.Hash import HMAC as _HMAC >@@ -43,7 +43,7 @@ def AESCTR(key, counter=0): > counter = Counter(counter) > if not isinstance(counter, Counter): > raise TypeError >- return Cipher.AES.new(key, Cipher.AES.MODE_CTR, counter=counter) >+ return AES.new(key, AES.MODE_CTR, counter=counter) > > class Counter(object): > def __init__(self, prefix):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 611608
:
511492