Skip to content

Commit 2f33f9f

Browse files
committed
fix: typo
1 parent 46e80ce commit 2f33f9f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/padding_oracle/legacy.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ def padding_oracle(ciphertext: Union[bytes, str],
4747
wether the ciphertext can be decrypted successfully.
4848
4949
Args:
50-
cipher (bytes|str) the cipher you want to decrypt
51-
block_size (int) block size (the cipher length should be
50+
ciphertext (bytes|str) the ciphertext you want to decrypt
51+
block_size (int) block size (the ciphertext length should be
5252
multiple of this)
53-
oracle (function) a function: oracle(cipher: bytes) -> bool
53+
oracle (function) a function: oracle(ciphertext: bytes) -> bool
5454
num_threads (int) how many oracle functions will be run in
5555
parallel (default: 1)
5656
log_level (int) log level (default: logging.INFO)
@@ -67,11 +67,11 @@ def padding_oracle(ciphertext: Union[bytes, str],
6767
if not callable(oracle):
6868
raise TypeError('the oracle function should be callable')
6969
if not isinstance(ciphertext, (bytes, str)):
70-
raise TypeError('cipher should have type bytes')
70+
raise TypeError('ciphertext should have type bytes')
7171
if not isinstance(block_size, int):
7272
raise TypeError('block_size should have type int')
7373
if not len(ciphertext) % block_size == 0:
74-
raise ValueError('cipher length should be multiple of block size')
74+
raise ValueError('ciphertext length should be multiple of block size')
7575
if not 1 <= num_threads <= 1000:
7676
raise ValueError('num_threads should be in [1, 1000]')
7777
if not isinstance(null_byte, (bytes, str)):

0 commit comments

Comments
 (0)