Package tlslite :: Module handshakehashes :: Class HandshakeHashes
[hide private]
[frames] | no frames]

Class HandshakeHashes

source code


Store and calculate necessary hashes for handshake protocol

Calculates message digests of messages exchanged in handshake protocol of SSLv3 and TLS.

Instance Methods [hide private]
 
__init__(self)
Create instance
source code
HandshakeHashes
copy(self)
Copy object
source code
 
digest(self, digest=None)
Calculate and return digest for the already consumed data.
source code
 
digestSSL(self, masterSecret, label)
Calculate and return digest for already consumed data (SSLv3 version)
source code
 
update(self, data)
Add data to hash input.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Create instance

Overrides: object.__init__

copy(self)

source code 

Copy object

Return a copy of the object with all the hashes in the same state as the source object.

Returns: HandshakeHashes

digest(self, digest=None)

source code 

Calculate and return digest for the already consumed data.

Used for Finished and CertificateVerify messages.

Parameters:
  • digest (str) - name of digest to return

digestSSL(self, masterSecret, label)

source code 

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(self, data)

source code 

Add data to hash input.

Parameters:
  • data (bytearray) - serialized TLS handshake message