VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. how to generate pssh for this kid?


    Code:
    <KID>4f+vhItifjG16xfWNfOu1A==</KID>
    Quote Quote  
  2. Find the script for converting KID to PSSH. There should be available in this forum.
    And this is the KID: e1ffaf848b627e31b5eb17d635f3aed4
    Quote Quote  
  3. Code:
    import base64
    
    def get_pssh(keyId):
        array_of_bytes = bytearray( b'\x00\x00\x002pssh\x00\x00\x00\x00')
        array_of_bytes.extend(bytes.fromhex("edef8ba979d64acea3c827dcd51d21ed"))
        array_of_bytes.extend(b'\x00\x00\x00\x12\x12\x10')
        array_of_bytes.extend(bytes.fromhex( keyId.replace("-", "")))
        return base64.b64encode(bytes.fromhex(array_of_bytes.hex()))
    
    kid = input("Please input KID in hex string from C4: ")
    kid = kid.replace(' ', '')
    kid = kid.replace('-', '')
    assert len(kid) == 32 and not isinstance(kid, bytes), "wrong KID length"
    print("PSSH {}".format(get_pssh(kid).decode('utf-8')))
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!