tlslite.handshakehashes module¶
Handling cryptographic hashes for handshake protocol
-
class
tlslite.handshakehashes.
HandshakeHashes
¶ Bases:
object
Store and calculate necessary hashes for handshake protocol
Calculates message digests of messages exchanged in handshake protocol of SSLv3 and TLS.
-
__init__
()¶ Create instance
-
copy
()¶ Copy object
Return a copy of the object with all the hashes in the same state as the source object.
Return type: HandshakeHashes
-
digest
(digest=None)¶ Calculate and return digest for the already consumed data.
Used for Finished and CertificateVerify messages.
Parameters: digest (str) – name of digest to return
-
digestSSL
(masterSecret, label)¶ Calculate and return digest for already consumed data (SSLv3 version)
Used for Finished and CertificateVerify messages.
Parameters: - masterSecret (bytearray) – value of the master secret
- label (bytearray) – label to include in the calculation
-
update
(data)¶ Add data to hash input.
Parameters: data (bytearray) – serialized TLS handshake message
-