Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 611608
Collapse All | Expand All

(-)a/.travis.yml (+1 lines)
Lines 2-6 language: python Link Here
2
python:
2
python:
3
  - '2.7'
3
  - '2.7'
4
  - '3.5'
4
  - '3.5'
5
  - '3.6'
5
install: 'pip install -r requirements.txt -r test-requirements.txt'
6
install: 'pip install -r requirements.txt -r test-requirements.txt'
6
script: ./run_tests.sh
7
script: ./run_tests.sh
(-)a/README.md (-2 / +2 lines)
Lines 8-21 Install the potr Python module: Link Here
8
8
9
    sudo python setup.py install
9
    sudo python setup.py install
10
10
11
__Dependencies__: pycrypto >= 2.1 (see [dlitz/pycrypto](https://github.com/dlitz/pycrypto))
11
__Dependencies__: pycryptodome
12
12
13
This software is experimental and potentially insecure. Do not rely on it
13
This software is experimental and potentially insecure. Do not rely on it
14
=========================================================================
14
=========================================================================
15
15
16
Usage Notes
16
Usage Notes
17
===========
17
===========
18
This module uses pycrypto's RNG. If you use this package in your application and your application
18
This module uses pycryptodome's RNG. If you use this package in your application and your application
19
uses `os.fork()`, make sure to call `Crypto.Random.atfork()` in both the parent and the child process.
19
uses `os.fork()`, make sure to call `Crypto.Random.atfork()` in both the parent and the child process.
20
20
21
Reporting bugs
21
Reporting bugs
(-)a/requirements.txt (-1 / +1 lines)
Line 1 Link Here
1
PyCrypto >= 2.1
1
pycryptodome
(-)a/setup.py (-3 / +3 lines)
Lines 22-28 try: Link Here
22
22
23
    from setuptools.command.install_lib import install_lib
23
    from setuptools.command.install_lib import install_lib
24
24
25
    args['install_requires']=['pycrypto>=2.1']
25
    args['install_requires']=['pycryptodome']
26
except ImportError:
26
except ImportError:
27
    print('\n*** setuptools not found! Falling back to distutils\n\n')
27
    print('\n*** setuptools not found! Falling back to distutils\n\n')
28
    from distutils.core import setup
28
    from distutils.core import setup
Lines 45-55 Install the potr Python module: Link Here
45
45
46
    sudo python setup.py install
46
    sudo python setup.py install
47
47
48
**Dependencies**: pycrypto >= 2.1 (see `dlitz/pycrypto <https://github.com/dlitz/pycrypto>`_)
48
**Dependencies**: pycryptodome
49
49
50
Usage Notes
50
Usage Notes
51
===========
51
===========
52
This module uses pycrypto's RNG. If you use this package in your application and your application
52
This module uses pycryptodomes's RNG. If you use this package in your application and your application
53
uses ``os.fork()``, make sure to call ``Crypto.Random.atfork()`` in both the parent and the child process.
53
uses ``os.fork()``, make sure to call ``Crypto.Random.atfork()`` in both the parent and the child process.
54
54
55
Reporting bugs
55
Reporting bugs
(-)a/src/potr/compatcrypto/pycrypto.py (-2 / +2 lines)
Lines 15-21 Link Here
15
#    You should have received a copy of the GNU Lesser General Public License
15
#    You should have received a copy of the GNU Lesser General Public License
16
#    along with this library.  If not, see <http://www.gnu.org/licenses/>.
16
#    along with this library.  If not, see <http://www.gnu.org/licenses/>.
17
17
18
from Crypto import Cipher
18
from Crypto.Cipher import AES
19
from Crypto.Hash import SHA256 as _SHA256
19
from Crypto.Hash import SHA256 as _SHA256
20
from Crypto.Hash import SHA as _SHA1
20
from Crypto.Hash import SHA as _SHA1
21
from Crypto.Hash import HMAC as _HMAC
21
from Crypto.Hash import HMAC as _HMAC
Lines 43-49 def AESCTR(key, counter=0): Link Here
43
        counter = Counter(counter)
43
        counter = Counter(counter)
44
    if not isinstance(counter, Counter):
44
    if not isinstance(counter, Counter):
45
        raise TypeError
45
        raise TypeError
46
    return Cipher.AES.new(key, Cipher.AES.MODE_CTR, counter=counter)
46
    return AES.new(key, AES.MODE_CTR, counter=counter)
47
47
48
class Counter(object):
48
class Counter(object):
49
    def __init__(self, prefix):
49
    def __init__(self, prefix):

Return to bug 611608