Skip to content

Commit

Permalink
馃搮 Commit Tue, 10 Aug 2021 22:05:52
Browse files Browse the repository at this point in the history
馃悰 fix type issues with EncryptionEncoding class
  • Loading branch information
securisec committed Aug 11, 2021
1 parent ecf6a7e commit c2ab66d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions chepy/modules/encryptionencoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def jwt_sign(self, secret: str, algorithms: str = "HS256") -> EncryptionEncoding
@ChepyDecorators.call_stack
def jwt_bruteforce(
self, wordlist: str, b64_encode: bool = False, algorithm: list = ["HS256"]
):
) -> EncryptionEncodingT:
"""Brute force JWT token secret
This method will use the provided wordlist to try and bruteforce the
Expand Down Expand Up @@ -390,7 +390,7 @@ def des_encrypt(
mode: str = "CBC",
hex_key: bool = False,
hex_iv: bool = True,
):
) -> EncryptionEncodingT:
"""Encrypt raw state with DES
DES is a previously dominant algorithm for encryption, and was published
Expand Down Expand Up @@ -450,7 +450,7 @@ def des_decrypt(
mode: str = "CBC",
hex_key: bool = False,
hex_iv: bool = True,
):
) -> EncryptionEncodingT:
"""Decrypt raw state encrypted with DES.
DES is a previously dominant algorithm for encryption, and was published
Expand Down Expand Up @@ -505,7 +505,7 @@ def triple_des_encrypt(
mode: str = "CBC",
hex_key: bool = False,
hex_iv: bool = True,
):
) -> EncryptionEncodingT:
"""Encrypt raw state with Triple DES
Triple DES applies DES three times to each block to increase key size. Key:
Expand Down Expand Up @@ -559,7 +559,7 @@ def triple_des_decrypt(
mode: str = "CBC",
hex_key: bool = False,
hex_iv: bool = True,
):
) -> EncryptionEncodingT:
"""Decrypt raw state encrypted with DES.
Triple DES applies DES three times to each block to increase key size. Key:
Expand Down Expand Up @@ -616,7 +616,7 @@ def aes_encrypt(
mode: str = "CBC",
hex_key: bool = False,
hex_iv: bool = True,
):
) -> EncryptionEncodingT:
"""Encrypt raw state with AES
Advanced Encryption Standard (AES) is a U.S. Federal Information Processing
Expand Down Expand Up @@ -685,7 +685,7 @@ def aes_decrypt(
mode: str = "CBC",
hex_key: bool = False,
hex_iv: bool = True,
):
) -> EncryptionEncodingT:
"""Decrypt raw state encrypted with DES.
Advanced Encryption Standard (AES) is a U.S. Federal Information Processing
Expand Down Expand Up @@ -758,7 +758,7 @@ def blowfish_encrypt(
mode: str = "CBC",
hex_key: bool = False,
hex_iv: bool = True,
):
) -> EncryptionEncodingT:
"""Encrypt raw state with Blowfish
Blowfish is a symmetric-key block cipher designed in 1993 by
Expand Down Expand Up @@ -810,7 +810,7 @@ def blowfish_decrypt(
mode: str = "CBC",
hex_key: bool = False,
hex_iv: bool = True,
):
) -> EncryptionEncodingT:
"""Encrypt raw state with Blowfish
Blowfish is a symmetric-key block cipher designed in 1993 by
Expand Down Expand Up @@ -963,7 +963,7 @@ def to_morse_code(
dash: str = "-",
letter_delim: str = " ",
word_delim: str = "\n",
):
) -> EncryptionEncodingT:
"""Encode string to morse code
Args:
Expand Down Expand Up @@ -993,7 +993,7 @@ def from_morse_code(
dash: str = "-",
letter_delim: str = " ",
word_delim: str = "\n",
):
) -> EncryptionEncodingT:
"""Decode morse code
Args:
Expand Down
22 changes: 11 additions & 11 deletions chepy/modules/encryptionencoding.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ class EncryptionEncoding(ChepyCore):
def jwt_decode(self: EncryptionEncodingT) -> EncryptionEncodingT: ...
def jwt_verify(self: EncryptionEncodingT, secret: str, algorithm: list=...) -> EncryptionEncodingT: ...
def jwt_sign(self: EncryptionEncodingT, secret: str, algorithms: str=...) -> EncryptionEncodingT: ...
def jwt_bruteforce(self: EncryptionEncodingT, wordlist: str, b64_encode: bool=..., algorithm: list=...) -> Any: ...
def jwt_bruteforce(self: EncryptionEncodingT, wordlist: str, b64_encode: bool=..., algorithm: list=...) -> EncryptionEncodingT: ...
def rc4_encrypt(self: EncryptionEncodingT, key: str, hex_key: bool=...) -> EncryptionEncodingT: ...
def rc4_decrypt(self: EncryptionEncodingT, key: str, hex_key: bool=...) -> EncryptionEncodingT: ...
def des_encrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> Any: ...
def des_decrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> Any: ...
def triple_des_encrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> Any: ...
def triple_des_decrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> Any: ...
def aes_encrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> Any: ...
def aes_decrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> Any: ...
def blowfish_encrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> Any: ...
def blowfish_decrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> Any: ...
def des_encrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> EncryptionEncodingT: ...
def des_decrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> EncryptionEncodingT: ...
def triple_des_encrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> EncryptionEncodingT: ...
def triple_des_decrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> EncryptionEncodingT: ...
def aes_encrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> EncryptionEncodingT: ...
def aes_decrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> EncryptionEncodingT: ...
def blowfish_encrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> EncryptionEncodingT: ...
def blowfish_decrypt(self: EncryptionEncodingT, key: str, iv: str=..., mode: str=..., hex_key: bool=..., hex_iv: bool=...) -> EncryptionEncodingT: ...
def vigenere_encode(self: EncryptionEncodingT, key: str) -> EncryptionEncodingT: ...
def vigenere_decode(self: EncryptionEncodingT, key: str) -> EncryptionEncodingT: ...
def affine_encode(self: EncryptionEncodingT, a: int=..., b: int=...) -> EncryptionEncodingT: ...
def affine_decode(self: EncryptionEncodingT, a: int=..., b: int=...) -> EncryptionEncodingT: ...
def atbash_encode(self: EncryptionEncodingT) -> EncryptionEncodingT: ...
def atbash_decode(self: EncryptionEncodingT) -> EncryptionEncodingT: ...
def to_morse_code(self: EncryptionEncodingT, dot: str=..., dash: str=..., letter_delim: str=..., word_delim: str=...) -> Any: ...
def from_morse_code(self: EncryptionEncodingT, dot: str=..., dash: str=..., letter_delim: str=..., word_delim: str=...) -> Any: ...
def to_morse_code(self: EncryptionEncodingT, dot: str=..., dash: str=..., letter_delim: str=..., word_delim: str=...) -> EncryptionEncodingT: ...
def from_morse_code(self: EncryptionEncodingT, dot: str=..., dash: str=..., letter_delim: str=..., word_delim: str=...) -> EncryptionEncodingT: ...
def rsa_encrypt(self: EncryptionEncodingT, pub_key_path: str) -> EncryptionEncodingT: ...
def rsa_decrypt(self: EncryptionEncodingT, priv_key_path: str) -> EncryptionEncodingT: ...
def rsa_sign(self: EncryptionEncodingT, priv_key_path: str) -> EncryptionEncodingT: ...
Expand Down

0 comments on commit c2ab66d

Please sign in to comment.