mirror of
https://github.com/devine-dl/pywidevine.git
synced 2025-05-03 08:04:26 +02:00
15 lines
403 B
Python
15 lines
403 B
Python
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] = []
|