This repository has been archived on 2024-07-02. You can view files and clone it, but cannot push or open issues or pull requests.
WV-AMZN-4K-RIPPER/pywidevine/cdm/key.py
widevinedump de9a72801e New
2021-12-23 17:15:20 +05:30

15 lines
521 B
Python

import binascii
class Key:
def __init__(self, kid, type, key, permissions=[]):
self.kid = kid
self.type = type
self.key = key
self.permissions = permissions
def __repr__(self):
if self.type == "OPERATOR_SESSION":
return "key(kid={}, type={}, key={}, permissions={})".format(self.kid, self.type, binascii.hexlify(self.key), self.permissions)
else:
return "key(kid={}, type={}, key={})".format(self.kid, self.type, binascii.hexlify(self.key))