'The constructor of the `SessionTicket()\' class.
The class variables are initialised and the validity of the symmetric
keys for the session tickets is checked.'

def __init__(self, masterKey, srvState):

    assert ((masterKey is not None) and (len(masterKey) == const.MASTER_KEY_LENGTH))
    checkKeys(srvState)
    self.IV = mycrypto.strongRandom(const.TICKET_AES_CBC_IV_LENGTH)
    self.state = ProtocolState(masterKey)
    self.symmTicketKey = srvState.aesKey
    self.hmacTicketKey = srvState.hmacKey
