'Calculate the PTK from the PMK
:param key: PMK
:param const_a: Constant defined in 802.11
:param const_b: Constant define in 802.11
:type key: str
:type const_a: str
:type const_b: str
:return: PTK
:rtype: str'

@staticmethod
def _prf512(key, const_a, const_b):

    blen = 64
    index = 0
    return_array = ''
    while (index <= (((blen * 8) + 159) / 160)):
        hmacsha1 = hmac.new(key, (((const_a + chr(0)) + const_b) + chr(index)), hashlib.sha1)
        index += 1
        return_array = (return_array + hmacsha1.digest())
    return return_array[:blen]
