Showing 324 of 1,708 total issues
Function hashAndVerify
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def hashAndVerify(self, sigBytes, bytes, rsaScheme='PKCS1', hAlg='sha1',
Function HKDF_expand_label
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def HKDF_expand_label(secret, label, hashValue, length, algorithm):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, p=0, q=0, g=0, x=0, y=0):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, p, q, g, x, y):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cipherSuite, clientHello, serverHello, acceptedCurves,
Function _clientResume
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _clientResume(self, session, serverHello, clientRandom,
Function create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, ticket_lifetime, ticket_age_add, ticket_nonce, ticket,
Function calcSSL2PendingStates
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def calcSSL2PendingStates(self, cipherSuite, masterSecret, clientRandom,
Function _pickServerKeyExchangeSig
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _pickServerKeyExchangeSig(settings, clientHello, certList=None,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cipherSuite, clientHello, serverHello,
Function calcPendingStates
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def calcPendingStates(self, cipherSuite, masterSecret, clientRandom,
Function create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(self, certificate_types=None, certificate_authorities=None,
Function handshakeClientAnonymous
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def handshakeClientAnonymous(self, session=None, settings=None,
Function calcFinished
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def calcFinished(version, masterSecret, cipherSuite, handshakeHashes,
Function calcMasterSecret
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def calcMasterSecret(version, cipherSuite, premasterSecret, clientRandom,
Function getTackExt
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def getTackExt(self):
"""Get the TACK and/or Break Sigs from a TACK Cert in the chain."""
tackExt = None
# Search list in backwards order
for x509 in self.x509List[::-1]:
- 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 addVarSeq
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def addVarSeq(self, seq, length, lengthLength):
"""
Add a bounded list of same-sized values
Create a list of specific length with all items being of the same
- 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 _isIP
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _isIP(address):
"""Return True if the address is an IPv4 address"""
if not address:
return False
vals = address.split('.')
- 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 open
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def open(self, nonce, ciphertext, aad):
if len(nonce) != 12:
raise ValueError("Bad nonce length")
if self.tagLength == 16 and len(ciphertext) < 16:
- 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 __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, n=0, e=0, key_type="rsa"):
self.rsa = None
self._hasPrivateKey = False
if (n and not e) or (e and not n):
raise AssertionError()
- 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"