|
|
@ -60,7 +60,11 @@ def init_table(key, method=None): |
|
|
|
encrypt_table = ''.join(get_table(key)) |
|
|
|
decrypt_table = string.maketrans(encrypt_table, string.maketrans('', '')) |
|
|
|
else: |
|
|
|
try: |
|
|
|
Encryptor(key, method) # make an Encryptor to test if the settings if OK |
|
|
|
except Exception as e: |
|
|
|
logging.error(e) |
|
|
|
sys.exit(1) |
|
|
|
|
|
|
|
|
|
|
|
def EVP_BytesToKey(password, key_len, iv_len): |
|
|
@ -88,9 +92,15 @@ method_supported = { |
|
|
|
'aes-192-cfb': (24, 16), |
|
|
|
'aes-256-cfb': (32, 16), |
|
|
|
'bf-cfb': (16, 8), |
|
|
|
'camellia-128-cfb': (16, 16), |
|
|
|
'camellia-192-cfb': (24, 16), |
|
|
|
'camellia-256-cfb': (32, 16), |
|
|
|
'cast5-cfb': (16, 8), |
|
|
|
'des-cfb': (8, 8), |
|
|
|
'idea-cfb': (16, 8), |
|
|
|
'rc2-cfb': (8, 8), |
|
|
|
'rc4': (16, 0), |
|
|
|
'seed-cfb': (16, 16), |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|