mirror of
https://github.com/devine-dl/pywidevine.git
synced 2024-10-30 05:29:21 +00:00
Create a Session class
This commit is contained in:
parent
82d99d50d0
commit
999900278f
14
pywidevine/session.py
Normal file
14
pywidevine/session.py
Normal file
@ -0,0 +1,14 @@
|
||||
from typing import Optional
|
||||
|
||||
from Crypto.Random import get_random_bytes
|
||||
|
||||
from pywidevine.key import Key
|
||||
from pywidevine.license_protocol_pb2 import DrmCertificate
|
||||
|
||||
|
||||
class Session:
|
||||
def __init__(self):
|
||||
self.id = get_random_bytes(16)
|
||||
self.service_certificate: Optional[DrmCertificate] = None
|
||||
self.context: dict[bytes, tuple[bytes, bytes]] = {}
|
||||
self.keys: list[Key] = []
|
Loading…
Reference in New Issue
Block a user