mirror of
https://github.com/devine-dl/pywidevine.git
synced 2025-04-29 17:49:44 +00:00
19 lines
482 B
Python
19 lines
482 B
Python
from typing import Optional
|
|
|
|
from Crypto.Random import get_random_bytes
|
|
|
|
from pywidevine.key import Key
|
|
from pywidevine.license_protocol_pb2 import SignedDrmCertificate
|
|
|
|
|
|
class Session:
|
|
def __init__(self, number: int):
|
|
self.number = number
|
|
self.id = get_random_bytes(16)
|
|
self.service_certificate: Optional[SignedDrmCertificate] = None
|
|
self.context: dict[bytes, tuple[bytes, bytes]] = {}
|
|
self.keys: list[Key] = []
|
|
|
|
|
|
__all__ = ("Session",)
|