diff --git a/setup.py b/setup.py index 1422d43..394ca8f 100644 --- a/setup.py +++ b/setup.py @@ -13,10 +13,7 @@ url='http://github.com/svetlyak40wt/django-fields/', install_requires=[ 'django', - 'pycrypto', - 'nose', - 'django-nose==1.4.4', - 'tox', + 'pycryptodome', ], classifiers=[ 'Development Status :: 2 - Pre-Alpha', diff --git a/src/django_fields/fields.py b/src/django_fields/fields.py index 3611510..4b3b17f 100644 --- a/src/django_fields/fields.py +++ b/src/django_fields/fields.py @@ -66,7 +66,7 @@ def __init__(self, *args, **kwargs): getattr(self.cipher_object, self.block_type), self.iv) else: - self.cipher = self.cipher_object.new(self.secret_key) + self.cipher = self.cipher_object.new(self.secret_key, self.cipher_object.MODE_ECB) self.prefix = '$%s$' % self.cipher_type self.original_max_length = max_length = kwargs.get('max_length', 40)