'Returns any parameters needed for Akamai HD player verification.
Algorithm originally documented by KSV, source:
http://stream-recorder.com/forum/showpost.php?p=43761&postcount=13'

@classmethod
def _pv_params(cls, session, pvswf, pv, **request_params):

    try:
        (data, hdntl) = pv.split(';')
    except ValueError:
        data = pv
        hdntl = ''
    cache = Cache(filename='stream.json')
    key = ('akamaihd-player:' + pvswf)
    cached = cache.get(key)
    request_params = deepcopy(request_params)
    headers = request_params.pop('headers', {})
    if cached:
        headers['If-Modified-Since'] = cached['modified']
    swf = session.http.get(pvswf, headers=headers, **request_params)
    if (cached and (swf.status_code == 304)):
        hash = cached['hash']
    else:
        hash = sha256()
        hash.update(swfdecompress(swf.content))
        hash = base64.b64encode(hash.digest()).decode('ascii')
        modified = swf.headers.get('Last-Modified', '')
        if (len(modified) < 40):
            cache.set(key, dict(hash=hash, modified=modified))
    msg = 'st=0~exp=9999999999~acl=*~data={0}!{1}'.format(data, hash)
    auth = hmac.new(AKAMAIHD_PV_KEY, msg.encode('ascii'), sha256)
    pvtoken = '{0}~hmac={1}'.format(msg, auth.hexdigest())
    params = [('pvtoken', pvtoken)]
    params.extend(parse_qsl(hdntl, keep_blank_values=True))
    return params
