Class Session
This class represents a TLS session.
TLS distinguishes between connections and sessions. A new handshake 
creates both a connection and a session. Data is transmitted over the 
connection.
The session contains a more permanent record of the handshake. The 
session can be inspected to determine handshake results. The session can 
also be used to create a new connection through "session 
resumption". If the client and server both support this, they can 
create a new connection based on an old session without the overhead of a 
full handshake.
The session for a tlslite.TLSConnection.TLSConnection can be 
retrieved from the connection's 'session' attribute.
  | Method Summary | 
|  | __init__(self) | 
| str | getCipherName(self)Get the name of the cipher used with this connection.
 | 
| bool | valid(self)If this session can be used for session resumption.
 | 
|  | _calcMasterSecret(self,
          version,
          premasterSecret,
          clientRandom,
          serverRandom) | 
|  | _clone(self) | 
|  | _createSharedKey(self,
          sharedKeyUsername,
          sharedKey) | 
|  | _setResumable(self,
          boolean) | 
| getCipherName(self)
  Get the name of the cipher used with this connection.
    Returns:
        The name of the cipher used with this connection. Either 
        'aes128', 'aes256', 'rc4', or '3des'.
        (type=str)
 | 
| valid(self)
  If this session can be used for session resumption.
    Returns:
        If this session can be used for session resumption.
        (type=bool)
 | 
  | Instance Variable Details | 
| sharedKeyUsernameThe client's shared-key username (or None).
  
  
    
      Type:
          str
       | 
| srpUsernameThe client's SRP username (or None).
  
  
    
      Type:
          str
       |