'Return the expanded output key material.
The output key material is calculated based on the given PRK, info and
L.'

def expand(self):

    tmp = ''
    if (len(self.T) > 0):
        raise base.PluggableTransportError('HKDF-SHA256    OKM    must    not    be    re-used    by    application.')
    while (self.length > len(self.T)):
        tmp = Crypto.Hash.HMAC.new(self.prk, ((tmp + self.info) + chr(self.ctr)), Crypto.Hash.SHA256).digest()
        self.T += tmp
        self.ctr += 1
    return self.T[:self.length]
