Showing 8 of 21 total issues
Function aes_decrypt_message
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def aes_decrypt_message(msg, aes_key):
# type: (bytes, bytes) -> Tuple[datetime, Any]
"""
AES decrypt a python object / bytes / string and check the encryption timestamp
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function remove_hf
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def remove_hf(
Function add_hf
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_hf(
Function aes_decrypt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def aes_decrypt(aes_key, nonce, tag, ciphertext):
# type: (bytes, bytes, bytes, bytes) -> bytes
"""
Decrypt a bytes message
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function aes_encrypt
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def aes_encrypt(msg, aes_key):
# type: (bytes, bytes) -> Tuple[Union[bytes, bytearray, memoryview], bytes, bytes]
"""
Encrypt a bytes message
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function rsa_decrypt_message
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def rsa_decrypt_message(msg, private_key):
# type: (bytes, str) -> Tuple[datetime, Any]
"""
RSA decrypt a python object / bytes / string and check the encryption timestamp
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function rsa_encrypt_message
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def rsa_encrypt_message(msg, public_key):
# type: (Any, str) -> bytes
"""
RSA encrypt a python object / bytes / string and add an encryption timestamp
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function aes_encrypt_message
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def aes_encrypt_message(msg, aes_key):
# type: (Any, bytes) -> bytes
"""
AES encrypt a python object / bytes / string and add an encryption timestamp
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"