forked from VideoDownloaders/Paramount-Plus-4k-Downloader
New
This commit is contained in:
15
pywidevine/cdm/key.py
Normal file
15
pywidevine/cdm/key.py
Normal file
@@ -0,0 +1,15 @@
|
||||
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(binascii.hexlify(self.kid), self.type, binascii.hexlify(self.key), self.permissions)
|
||||
else:
|
||||
return "key(kid={}, type={}, key={})".format(binascii.hexlify(self.kid), self.type, binascii.hexlify(self.key))
|
||||
Reference in New Issue
Block a user