#NEWLINE# def _calcSSLHandshakeHash( self , masterSecret , label ) : #NEWLINE# #INDENT# masterSecretStr = bytesToString ( masterSecret ) #NEWLINE# imac_md5 = self . _handshake_md5 . copy ( ) #NEWLINE# imac_sha = self . _handshake_sha . copy ( ) #NEWLINE# imac_md5 . update ( ( ( label + masterSecretStr ) + ( '6' * 48 ) ) ) #NEWLINE# imac_sha . update ( ( ( label + masterSecretStr ) + ( '6' * 40 ) ) ) #NEWLINE# md5Str = md5 . md5 ( ( ( masterSecretStr + ( '\\' * 48 ) ) + imac_md5 . digest ( ) ) ) . digest ( ) #NEWLINE# shaStr = sha . sha ( ( ( masterSecretStr + ( '\\' * 40 ) ) + imac_sha . digest ( ) ) ) . digest ( ) #NEWLINE# return stringToBytes ( ( md5Str + shaStr ) )