mirror of
https://github.com/devine-dl/pywidevine.git
synced 2025-04-30 01:59:44 +00:00
Cdm: Use reversed OEMCrypto request id formula for Android devices
It's effectively 8 random bytes with a counter thats right-padded (to 8 bytes). This counter is the Session number.
This commit is contained in:
parent
838df7c22b
commit
2af929a83d
@ -279,6 +279,9 @@ class Cdm:
|
||||
except ValueError:
|
||||
raise InvalidLicenseType(f"License Type {type_!r} is invalid")
|
||||
|
||||
if self.device_type == Device.Types.ANDROID:
|
||||
request_id = get_random_bytes(8) + session.number.to_bytes(8, "little")
|
||||
else:
|
||||
request_id = get_random_bytes(16)
|
||||
|
||||
license_request = LicenseRequest()
|
||||
|
Loading…
x
Reference in New Issue
Block a user