Skip to content

Commit cd33449

Browse files
committed
Add ipdb for dev
Use constant for default modulus
1 parent 123031c commit cd33449

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
cryptography==1.3.2
2+
ipdb

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
'Intended Audience :: Developers',
1919
],
2020
install_requires=[
21-
'cryptography',
21+
'cryptography>=1.3.2',
2222
],
2323
test_suite="tests",
2424
)

simple_asym/asymmetric_encryption.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
MissingAESException, MissingRSAPrivateException, MissingRSAPublicException)
1212

1313

14+
DEFAULT_MODULUS = 4096
15+
16+
1417
class AsymCrypt():
1518
aes_cipher = None
1619

@@ -51,7 +54,7 @@ def _force_bytes(self, text):
5154
pass
5255
return text
5356

54-
def make_rsa_keys(self, passphrase=None, bits=4096):
57+
def make_rsa_keys(self, passphrase=None, bits=DEFAULT_MODULUS):
5558
""" Create new rsa private and public keys
5659
5760
:param passphrase: Optional RSA private key passphrase. Returns encrypted
@@ -84,7 +87,7 @@ def make_rsa_keys(self, passphrase=None, bits=4096):
8487
)
8588
return private, public
8689

87-
def make_rsa_keys_with_passphrase(self, bits=4096):
90+
def make_rsa_keys_with_passphrase(self, bits=DEFAULT_MODULUS):
8891
""" Wrapper around make_rsa_keys that also generates a passphrase
8992
9093
:param bits: Bits for pycrypto's generate function. Safe to ignore.

0 commit comments

Comments
 (0)