mirror of
https://github.com/Legrandin/pycryptodome.git
synced 2025-12-08 05:19:46 +00:00
Reimplement ARC2
ARC2 is only interesting for historical reasons, and it should not be used for new designs. The current implementation trips PyPy4 which may indicate a bug: a cleaner rewriting based on RFC2268 is the quickest solution.
This commit is contained in:
parent
e91963af09
commit
6e41d35fb3
2 changed files with 170 additions and 196 deletions
|
|
@ -100,8 +100,9 @@ def _create_base_cipher(dict_parameters):
|
|||
if len(key) not in key_size:
|
||||
raise ValueError("Incorrect ARC2 key length (%d bytes)" % len(key))
|
||||
|
||||
if not (0 <= effective_keylen <= 1024):
|
||||
raise ValueError("'effective_key_len' must be positive and no larger than 1024")
|
||||
if not (0 < effective_keylen <= 1024):
|
||||
raise ValueError("'effective_key_len' must be no larger than 1024 "
|
||||
"(not %d)" % effective_keylen)
|
||||
|
||||
start_operation = _raw_arc2_lib.ARC2_start_operation
|
||||
stop_operation = _raw_arc2_lib.ARC2_stop_operation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue