ct_check_cbc_mac_and_pad(data,
mac,
seqnumBytes,
contentType,
version)
| source code
|
Check CBC cipher HMAC and padding. Close to constant time.
- Parameters:
data (bytearray) - data with HMAC value to test and padding
mac (hashlib mac) - empty HMAC, initialised with a key
seqnumBytes (bytearray) - TLS sequence number, used as input to HMAC
contentType (int) - a single byte, used as input to HMAC
version (tuple of int) - a tuple of two ints, used as input to HMAC and to guide checking
of padding
- Returns: boolean
- True if MAC and pad is ok, False otherwise
|